Skip to content

Instantly share code, notes, and snippets.

View creative-cranels's full-sized avatar
🙃
Sup?

Mukhamejanov Azamat creative-cranels

🙃
Sup?
View GitHub Profile
0000ff0e-0000-1000-8000-00805f9b34fb
// No Data
# app/models/stat.rb
class Stat
def calculate!
raise "implement"
end
E/SQLiteLog: (1555) abort at 13 in [INSERT INTO service(name,price,description,is_deleted,id,is_new) VALUES (?,?,?,?,?,?)]: UNIQUE constraint failed: service.id
E/SQLiteDatabase: Error inserting name=null price=3000 description=null is_deleted=false id=56 is_new=false
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: service.id (code 1555)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:791)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1501)
at android.database.sqlite.SQLiteDatabase.insert(
# c++
string sslCert = "some large random string"
int ssl_xor[10];
fill(ssl_xor, ssl_xor + 10, 0);
for (int i = 0; i < sslCert.size(); i += 10) {
for (int j = 0; j < 10 && i + j < sslCert.size(); j++) {
ssl_xor[j] = ssl_xor[j] ^ (int)sslCert[i + j];
}
}
console.log("hi");