Szabi Zsoldos 26 Learner and helper guy

This is weird, could you show us the console please?

Szabi Zsoldos 26 Learner and helper guy

Yes, it was, used this method with ant to build my jar file and it worked well.

http://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial1

Szabi Zsoldos 26 Learner and helper guy

Hi guys,

I've made an application in JavaFX and I do want to export it into a runnable jar.
When I run it from Eclipse or Netbeans, it works well.
But when I run it from windows as an executable jar I get this error for my layout.

Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: Exception in Application start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
        at com.sun.javafx.application.LauncherImpl$$Lambda$2/1338668845.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Location is not set.
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2438)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2413)
        at application.MainApp.initRootLayout(MainApp.java:47)
        at application.MainApp.start(MainApp.java:38)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
        at com.sun.javafx.application.LauncherImpl$$Lambda$52/2117128939.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl$$Lambda$48/1721003345.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
        at com.sun.javafx.application.PlatformImpl$$Lambda$50/268638582.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
        at com.sun.javafx.application.PlatformImpl$$Lambda$49/42105627.run(Unknown Source)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101)
        at com.sun.glass.ui.win.WinApplication$$Lambda$38/622073264.run(Unknown Source)
        ... 1 more

My code looks like this on the 47'th line loader.setLocation(getClass().getResource("../application/view/RootLayout.fxml"));

private void initRootLayout() {
    try {
        // Load root layout from fxml file.
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getClass().getResource("../application/view/RootLayout.fxml"));
        rootLayout = (BorderPane) loader.load();
        // Show the scene containing the root layout
        Scene scene = new Scene(rootLayout);
        //scene.getStylesheets().add("application/application.css");
        primaryStage.setScene(scene);
        primaryStage.show();

    } catch(IOException e) {
        e.printStackTrace();
    }
}
Szabi Zsoldos 26 Learner and helper guy

Got the problem, I've changed the layout from RelativeLayout to LinearLayout and it is all working fine.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/view_background"
    android:orientation="vertical"
    android:padding="10dp"
    android:weightSum="1">

    <ProgressBar
        android:id="@+id/progressBar1"
        style="@style/Base.Widget.AppCompat.ProgressBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:progress="@integer/abc_config_activityShortDur"
        android:layout_centerInParent="true"
        android:maxHeight="100dp"
        android:maxWidth="100dp"
        android:minHeight="200dp"
        android:minWidth="200dp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/btnUploadedActivity"
        android:id="@+id/imagesListViewTitle"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <ListView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/imagesListView"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignLeft="@+id/imagesListViewTitle"
        android:layout_below="@+id/imagesListViewTitle"
        android:smoothScrollbar="true" />
</LinearLayout>
Szabi Zsoldos 26 Learner and helper guy

Sorry, here it is :)

My Model:

public class ImagesModel {
    private int sapCode;
    private String imagePath;
    private int icon;

    public ImagesModel(int sapCode, String imagePath, int icon) {
        this.sapCode = sapCode;
        this.imagePath = imagePath;
        this.icon = icon;
    }

    public int getSapCode() {
        return sapCode;
    }

    public String getImagePath() {
        return imagePath;
    }

    public int getIcon() {
        return icon;
    }
}

And My Activity

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

import ro.sz.dezmembrari.sza.Config;
import ro.sz.dezmembrari.sza.JSONParser;
import ro.sz.dezmembrari.sza.R;
import ro.sz.dezmembrari.sza.model.ImagesModel;

/**
 * Created by Szabi.Zsoldos on 28/04/2015.
 */
public class ImagesListView extends Activity {

    private List<ImagesModel> myImages = new ArrayList<ImagesModel>();
    long totalSize = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.uploaded_layout);

        populateImageList();
        populateListView();
    }

    private void populateImageList() {
        new GetReportFromAPI().execute();
    }

    private void populateListView() {
        ArrayAdapter<ImagesModel> adapter = new MyListAdapter();
        ListView list = (ListView) findViewById(R.id.imagesListView);
        list.setAdapter(adapter);
        adapter.clear();
    }

    private class MyListAdapter extends ArrayAdapter<ImagesModel> {

        public MyListAdapter() {
            super(ImagesListView.this, R.layout.item_view, myImages);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            // Make sure we have a view to work with
            View itemView = convertView;
            if(itemView == null) {
                itemView = getLayoutInflater().inflate(R.layout.item_view, parent, false);
            }

            // find the image to work with
            ImagesModel currentImage = myImages.get(position);

            // fill the view

            ImageView imageView = (ImageView) itemView.findViewById(R.id.item_icon);
            try {
                Picasso.with(ImagesListView.this).load(currentImage.getImagePath()).into(imageView);
            } catch(Exception e) {
                imageView.setImageResource(currentImage.getIcon());
            }

            TextView sapCode = (TextView) itemView.findViewById(R.id.item_txtSAPCode);
            sapCode.setText("" + currentImage.getSapCode());

            TextView imagePath = (TextView) itemView.findViewById(R.id.item_imagePath); …
Szabi Zsoldos 26 Learner and helper guy

Hi guys,

I'm having a weird problem regarding the simple ListView.
On my emulator everything is allright and the data is loaded correctly from JSON API, the data also loads on my device.
The problem is that on my emulator, the listview is populated but on my real device, not, why ?

1.jpg2.jpg

Szabi Zsoldos 26 Learner and helper guy

This might help you alot: Click Here

Szabi Zsoldos 26 Learner and helper guy

I would do it like this, create an invisible isPosted value and check if on the index.php it's set with isset($_POST['isPosted'])

    <h2><i>PLEASE FILL IN YOUR DETAILS TO COMPLETE YOUR ORDER</i></h2>
    <form method="post" action="index.php" enctype="multipart/form-data">
    First name:<br>
    <input type="text" name="First_Name">
    <br>
    Last name:<br>
    <input type="text" name="Sur_Name">
    <br>
    Address:<br>
    <input type="text" name="Cus_Address">
    <br>
    Email:<br>
    <input type="text" name="Cus_Email">
    <br>
    Phone:<br>
    <input type="text" name="Phone_Num">
    <br><br>
    <input type="submit" value="Submit">
    <input type="hidden" name="isPosted" value="1" />
    </form>

Try the below code as the insert query and see the output

if(isset($_POST['isPosted']) && $_POST['isPosted'] == 1) {
    $insertedData = mysql_query($serverConnection,"INSERT INTO customertable(CustomerId,FirstName, SurName, Address, PhoneNum, Email, ProductPurchase) VALUES( 'NULL', '$_POST[First_Name]', '$_POST[Sur_Name]', '$_POST[Cus_Address]', '$_POST[Phone_Num]', '$_POST[Cus_Email]', '3')" ) or die(mysql_error());
} else {
    die('No POST data found.');
}
Szabi Zsoldos 26 Learner and helper guy

It would be much easier to use the PDO class for MySQL queries.
Also, try to make a rule for your case typing on your Variables.

Try this, first create your PDO server connection as $connection

$customer_id = $_POST[Customer_ID];
$first_post = $_POST[First_Post];
$sur_name = $_POST[Sur_Name];
$cus_address = $_POST[Cus_Address];
$phone_num = $_POST[Phone_Num];
$cus_email = $_POST[Cus_Email];
$product_purchase = $_POST[Product_Purchase];

$sql = 'INSERT INTO customertable( `CustomerID`, `FirstName`, `SurName`, `Address`, `PhoneNum`, `Email`, `PurchaseProduct`) VALUES(:customer_id, :first_post, :sur_name, :cus_address, :phone_num, :cus_email, :product_purchase)';

$query = $connection->prepare($sql);
$query->execute(array(
    ':customer_id'      =>  $customer_id,
    ':first_post'       =>  $first_post,
    ':sur_name'         =>  $sur_name,
    ':cus_address'      =>  $cus_address,
    ':phone_num'        =>  $phone_num,
    ':cus_email'        =>  $cus_email,
    ':product_purchase' =>  $product_purchase,
));
broj1 commented: This i the way to go +11
Szabi Zsoldos 26 Learner and helper guy
//Try this

    <select name='price' id='price'>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '')?'SELECTED="SELECTED"':'')?> value='' >Select....</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '0-50,000')?'SELECTED="SELECTED"':'')?> value='0-50,000'>0-50,000</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '50,000-100,000')?'SELECTED="SELECTED"':'')?> value='50,000-100,000'>50,000-100,000</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '100,000-150,000')?'SELECTED="SELECTED"':'')?> value='100,000-150,000'>100,000-150,000</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '150,000-200,000')?'SELECTED="SELECTED"':'')?> value='150,000-200,000'>150,000-200,000</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == '200,000 and above')?'SELECTED="SELECTED"':'')?> value='200,000 and above'>200,000 and above</option>
        <option <?=((isset($_POST['price']) && $_POST['price'] == 'see all')?'SELECTED="SELECTED"':'')?> value='see all'>See All</option>
    </select>
Szabi Zsoldos 26 Learner and helper guy

I am using mpdf for example and it works just great.
My aproach is that every time a customer request a document it's get generated on the fly and it's pushed to download via a header function.

Szabi Zsoldos 26 Learner and helper guy

Thanks pritaeas for the heads up, it was a great start :)
This is my final implementation and it works great.

        echo '<table width="600" cellpadding="0" cellspacing="0" border="0" class="table table-condensed">';    
        echo '<tbody>';        
        $previous = '';
        foreach($promotii as $promotie) {            
            if ($previous != $promotie->Marca) {
                if (!empty($previous)) {
                } else {
                    $previous = $promotie->Marca;
                }

                echo '<tr>';
                    echo '<td>';
                        echo $promotie->Marca;
                    echo '</td>';
                echo '</tr>';                  
            }

            echo '<tr>'; // start product stuff
            echo '</tr>'; // end of product stuff

            $previous = $promotie->Marca;
        }
        echo '</tbody>';
        echo '</table>';      
Szabi Zsoldos 26 Learner and helper guy

Mine is PHPEd from NuSphere, amazing product, it's not free but it's worth the money.

Code suggestion is not case sensitive, great syntax highlighting, framework support, etc.

diafol commented: Looks interesting +15
Szabi Zsoldos 26 Learner and helper guy

Hi guys,

I have one simple logical question that I seem not to figure it out, sadly...

We have a list of objects and I loop trough them, list of products.
We need to create anchor maps for each category, so I did a comparison with temp variables to check the previous and current element value.

How can I display only the first occurence of a series of values for each category ?

Desired result:

Category 1
- product 1
- product 2
- product 3
Category 2
- product 1
- product 2
- product 3

    $previous = '';
    if(!empty($promotii)) {
        foreach($promotii as $promotie) {
            $previous = $promotie->Marca;
        }
        $previous = $promotie->Marca;
     }
Szabi Zsoldos 26 Learner and helper guy

Thank you Taywin, you solution was the good one, I've splitted the output in PHP and transformed it in array and counted the same occurences and it worked well!

Because recent modified files do not have year number display in the list. You may try ls -la --full-time and will have to update some of your display.

>     #!/bin/bash
>     year=$(date +"%Y")
>     if [ $# -gt 0 ] ; then
>     year=$1
>     fi
>     echo $year
>     list=$(ls -la --full-time | awk -v pattern="$year" '$6 ~ pattern { printf ("%s %s ", $6, $9) }')
>     echo $list

The above is a quick & dirty test of how to capture all files that were modified at a given year (or the current year if no argument is passed). Column 6 in the list is now yyyy-mm-dd instead of spelling out month name.

Szabi Zsoldos 26 Learner and helper guy

Hey guys,

I have this script that does count one year of files, 2014, but when it comes to this year, everything messes up.
How could I count properly for each year in the same script ?

In the attached screenshot it's obvious that I would only need 2014 - all of the months and from 2015 only January, but .... how ?

Thanks in advance!

ls -la |
awk -v year="$(date "+%Y")" 'BEGIN {
        split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec", month, " ")
        for (i=1; i<=12; i++){ 
            mdigit[month[i]]=i
        }
    }
!/^-/{next}
$8 ~ /:/{$8=year} {
  dat=$8 sprintf("%02d",mdigit[$6]) sprintf("%02d",$7)
  a[dat]++
}
END{for(i in a){print i, a[i]|"sort"}}'
Szabi Zsoldos 26 Learner and helper guy

Hello, this is what I should do, i know, I will loose some SEO ranking because of this :(

Szabi Zsoldos 26 Learner and helper guy

Hi guys,

I have this weird .htaccess rule that is used for a dropdown search engine

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+) index.php?bla1=$1&bla2=$2... and so on [L]

If I want to maintain the above rule, it is allright.
The problem is that I want to creat a new rule with 3 variables, but the above rule is overwriting everything and it does not let me, what should I do?
If I rewrite the above rule, I will loose some important SEO ranking points.

Thanks in advance,
Szabi Zsoldos

Szabi Zsoldos 26 Learner and helper guy

Got my solution.

SELECT p.SKU,
  p.productName,
  MAX(IF(t.AttributeClassValueId = '1', t.AttributeClassValue, NULL)) AS Atribute1,
  MAX(IF(t.AttributeClassValueId = '2', t.AttributeClassValue, NULL)) AS Atribute2,
  MAX(IF(t.AttributeClassValueId = '3', t.AttributeClassValue, NULL)) AS Atribute3,
  MAX(IF(t.AttributeClassValueId = '4', t.AttributeClassValue, NULL)) AS Atribute4,
  MAX(IF(t.AttributeClassValueId = '5', t.AttributeClassValue, NULL)) AS Atribute5
FROM CatSys_products p
    LEFT JOIN CatSys_productAttributeClassValuesFromProducts t ON p.id = t.ProductId
    LEFT JOIN CatSys_productAttributeClassValues a ON t.AttributeClassValueId = a.id
GROUP BY p.SKU, p.productName
Szabi Zsoldos 26 Learner and helper guy

Hi guys,

Trying to develop a custom facet like search in Mysql.
I have 3 tables for this:

1.Attribute class
2.Attribute class Name
3.Attribute class Value
    - attributeClassName Id
    - productId
4.Products

Each product has one attribute class
Each attribute class has many values

Each value is contained in a sepparate row in the AttributeClassValue table, how can i Filter by values in that table ?
Group Concat is not the best solution....

Szabi Zsoldos 26 Learner and helper guy

Thank you Dani, good job on finding the problem.

Szabi Zsoldos 26 Learner and helper guy

My bad ...

This is the link commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html#substring(java.lang.String, int, int)

for the Substring.

Tha application does not stop, it is built upon Spring and this is a file processor that reads all the lines.

As you can see on the first printscreen, the characters are there, but the method exits.

LE: with the standard value.substring() method, it works...

Szabi Zsoldos 26 Learner and helper guy

Hello people :)

Having some difficulties regarding a simple substring.
Then length of my line is 52 and I iterate it without any problems.

When I use this untill the 22nd character it is working

final String articleNumber = StringUtils.trimToEmpty(StringUtils.substring(lineValue, 0, 22));

If I want to pass over the 22nd character, everything stops, empty.
Take a look at the StackTrace screenshot...can you figure it out why it is not working ?

488afabad01fca57105183078113085f

        final String articleNumber = StringUtils.trimToEmpty(StringUtils.substring(lineValue, 0, 22));
        final String articleManufacturer = StringUtils.trimToEmpty(StringUtils.substring(lineValue, 22, 4));
        final String descriptionNumber = StringUtils.trimToEmpty(StringUtils.substring(lineValue, 26, 9));

Thank you!

Szabi Zsoldos 26 Learner and helper guy

Hey guys,

Just tried to log in on Mozilla Firefox 30.0 and it does not give me an alert toast/message.
My credentials are good because it worked on IE11 and Google Chrome.

I've tried searching something on this topic, but haven't found anything.

Have a great day everybody!

Szabi Zsoldos 26 Learner and helper guy

Got it solved with &&

Szabi Zsoldos 26 Learner and helper guy

if i use each part separately, it works ...

Szabi Zsoldos 26 Learner and helper guy

Hey guys,

Having some difficulties understanding why my OR || operator is not working...
First part is BOOLEAN and it is working
Second part is STRING and it is working, it returns the desired value

What could it be ?

<?php if(($oferte->isOrdered($oferte->CleanSapStyleNumbers($oferta->VBELN)) == false) || ($oferte->OfertaValida($oferte->CleanSapStyleNumbers($oferta->VBELN))->valabilitate == "VALABILA")): ?>
some stuff
<?php endif; ?>
Szabi Zsoldos 26 Learner and helper guy

can you post the code from the upload from your script ?

Szabi Zsoldos 26 Learner and helper guy

As far it seems, you did not give permission to the Java to load properly.

Szabi Zsoldos 26 Learner and helper guy

Forgot to add after the url parameter the data: data, parameter so you can send your values to extract exactly what you need.

Szabi Zsoldos 26 Learner and helper guy

One of the simplest methods is to use jQuery's Ajax method to do this.

https://api.jquery.com/jQuery.ajax/

Example code -> not tested

$.ajax({
  url: "your_link.html",
  cache: false,
  success: function(data){
    // you can do an each sequence to append every value to the 
    // select box as options
    // I would respond with a json for the beginning
    // and iterate over every element so you can build your dropdown

    $("#your_select_box").html();
    $.each(data, function( key, value ) {
        $("#your_select_box").append("<option value='" + key + "'>" + value + "</option>");
    }
  }
});
Szabi Zsoldos 26 Learner and helper guy

Yes, you're right, I did not think in that way at first but now, it's a different story :)

Szabi Zsoldos 26 Learner and helper guy

This cannot be done with the prompt() function, you shoul look towards the jQueryUI or something like that.

Szabi Zsoldos 26 Learner and helper guy

Got it, I will not post any snippets again :)

Szabi Zsoldos 26 Learner and helper guy

In that case you have to use this

<?php
$server="localhost";
$username="root";
$password="";
$connect_mysql=mysql_connect($server,$username,$password) or die ("Connection Failed!");
$mysql_db=mysql_select_db("reportdatabase",$connect_mysql) or die ("Could not Connect to Database");
    $db_sch = "SELECT * FROM cweb01group WHERE  `GroupCode` ='".$_POST['group']."'";
    //echo $db_sch;
    $i = 0;
    $res = mysql_query($db_sch) or die(mysql_error());
    //echo mysql_num_rows($res);
    while($row = mysql_fetch_assoc($res)) {
        echo " <tr>
              <td><a href='testingagain.php?module=".$row['ModuleCode']."</td>
              <td>".$row['ModuleTitle']."</td></br>
              </tr>";
        }
mysql_close($connect_mysql);
?>

Anyway, you should check if there is any value in the post request and be aware of the injection possibilities.

Szabi Zsoldos 26 Learner and helper guy

What do you mean by this, in more details?

Szabi Zsoldos 26 Learner and helper guy

I posted it to the Tutorials for those who may need it for school :)

Szabi Zsoldos 26 Learner and helper guy

This is intented for learning purposes, feel free to study the code

Create a drawing that looks like this (pyramid)
The number should be incremented with the modulus.

Szabi Zsoldos 26 Learner and helper guy

Please read the documentation for the function: jquery UI datepicker

Simple usage

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>


</body>
</html>
Szabi Zsoldos 26 Learner and helper guy

First please create a sqlfiddle with your tables and data so we can help you with the query.

Szabi Zsoldos 26 Learner and helper guy

Line 11 looks weird with the SHA1 function.

$sql="SELECT * FROM admin WHERE username='$myusername' AND passcode='.sha1[$mypassword]' ";

//should be

$sql="SELECT * FROM admin WHERE username='".mysql_real_escape_string($myusername)."' AND passcode='".sha1(mysql_real_escape_string($mypassword))."' ";
Szabi Zsoldos 26 Learner and helper guy

Make sure that the username has access from the IP from where you want to connect to the server.

Is localhost your server or a remote one ?

Szabi Zsoldos 26 Learner and helper guy

I think that it is your PHP tags and other little problems.
Try this.

<?php
    $balance = $match_value['balance'];
    $verified = $match_value['verified'];
?>
<tr>
    <th>Balance:</th>
    <td> 
    <?php if ($verified == 1) {
        $verified = $balance;
    } else {
       echo '<a class="btn btn-danger" href="verified.php"> not verified </a>';
    } 
    ?>
    </td>
</tr>
Szabi Zsoldos 26 Learner and helper guy

If I would have to chose, I would chose the browser, it is more easier, but also the media players it is okay.

For the browser and media player look at Java FX. -> WebView

Szabi Zsoldos 26 Learner and helper guy

That is true, my ideea was that I had limited players, almost 50k and I did a max of 100K.

Szabi Zsoldos 26 Learner and helper guy

Raffle function to generate unique numbers for each player, related to the same table with a recursive aproach.

I had to do a simple raffle system for a contest that I was working on and tried many things and the most simple and the most effective one to generate unique numbers for each player was this, a simple recursive function.

Szabi Zsoldos 26 Learner and helper guy

Can you post an sqlfiddle ?

Szabi Zsoldos 26 Learner and helper guy

Never have known about this simple LIKE usage in this form! Great input diafol!!!

Szabi Zsoldos 26 Learner and helper guy

Got it solved :)

SELECT CONCAT(SUBSTRING_INDEX(i.submodel, '(', 1), '', SUBSTRING_INDEX(i.submodel, ')', -1)) AS model FROM products.items as i
    WHERE i.vendor_name LIKE '%(Product_SH)'
GROUP BY 1

f3a468a094655ec9d09f858762daffea

Szabi Zsoldos 26 Learner and helper guy

Hey guys,

I am having some difficulties regarding a select query logic.
Then I have a table with products and it has a column -> submodel with all kind of data in it.

3bcf9a8dac9e8218c88209198e26a7e5

What I want to achieve is to STRIP (with REGEXP?) all the strings starting with ( and ending with ) and then GROUP all X5 for example and instead of 7 X5's I want to have only 1.

Is this possible directly in MySQL ? The ideea is that I cannot clean the column because the data is used in other places also.