This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
public class ConnectionManager { | |
private static Connection connection; | |
// path to the database file | |
private static final String dbPath = "tips.db"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.guendouz.textclustering.preprocessing; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* @author Mohamed Guendouz | |
*/ | |
public class TFIDFCalculator { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.gdgsba.gdgdevfest.view.activity; | |
import android.animation.AnimatorInflater; | |
import android.animation.AnimatorSet; | |
import android.databinding.DataBindingUtil; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import org.gdgsba.gdgdevfest.R; | |
import org.gdgsba.gdgdevfest.databinding.SplashScreenActivityBinding; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
... | |
{ | |
"_id" : ObjectId("59766c9dd95ba6044cbfa8d7"), | |
"created_time" : ISODate("2016-12-30T21:38:05.000Z"), | |
"from" : { | |
"name" : "Belghit Ismail", | |
"id" : "586200464846313" | |
}, | |
"message" : "salam ala'ikom ,\nany one interested in Nodejs here \njust asking :).", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find the total number of posts | |
db.getCollection('COLLECTION_NAME').find({}).count() | |
// Find posts published before a particular date (Ex: before April 4th, 2016) | |
db.getCollection('COLLECTION_NAME').find({"created_time" : {$lt: ISODate("2016-04-04T00:00:00.000Z")} }) | |
// Find posts published after a particular date (Ex: after April 4th, 2016) | |
db.getCollection('COLLECTION_NAME').find({"created_time" : {$gt: ISODate("2016-04-04T00:00:00.000Z")} }) | |
// Find posts published between two particular dates sorted in an ascending order (Ex: between April 4th, 2016 and May 4th, 2016) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{ | |
#include <stdlib.h> | |
#include "y.tab.h" | |
%} | |
%% | |
[0-9]+ { | |
yylval = atoi(yytext); | |
return ENTIER; | |
} | |
[-+\n] return *yytext; |