Id int64 34.6M 60.5M | Title stringlengths 15 150 | Body stringlengths 33 36.7k | Tags stringlengths 3 112 | CreationDate stringdate 2016-01-01 00:21:59 2020-02-29 17:55:56 | Y stringclasses 3 values |
|---|---|---|---|---|---|
36,279,301 | Tkinter real time clock display | I want to create real time clock using Tkinter and time library. I have created a class but somehow i am not able to figure out my problem...can anyone help me out with this???
from tkinter import *
import time
root = Tk()
class Clock:
def __init__(self):
self.time1 = ''
self.time2 = time.strftime('%H:%M:%S')
self.mFrame = Frame()
self.mFrame.pack(side=TOP,expand=YES,fill=X)
self.watch = Label (self.mFrame, text=self.time2, font=('times',12,'bold'))
self.watch.pack()
self.watch.after(200,self.time2)
obj1 = Clock()
root.mainloop()
This is my code.... | <python><tkinter> | 2016-03-29 08:36:30 | LQ_EDIT |
36,279,371 | Logout after don't navigate before page | Login.php and logout.php page provided below.
How to create an session varible and once logout successful don't navigate before page.
require( 'dbConfig.php');
session_start();
$msg = "";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$name = $_POST["userid"];
if ($name == '' ) {
$msg = "You must enter all fields";
}
else
{
$sql = "SELECT * FROM user WHERE userid = '$name' ";
$query = mysql_query($sql);
if ($query === false) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($query) > 0) {
$_SESSION['userid'] = $name;
header('Location: teams.php');
exit;
}
$msg = "Username do not match";
}
}
?>
<?php
session_start();
if(session_destroy())
{
header("Location: index.php");
}
?>
After logout of the page navigating back pages.please disable solution. | <php><session> | 2016-03-29 08:40:37 | LQ_EDIT |
36,279,526 | Android Permission 6.0 | Hi guys i just want to know on how can u have a listener for this one like i know android have onRequestPermissionsResult but the thing is if i changed it from the application information and manually changed the permission from there thats where my problem lies because i dont have any callback do you guys have any idea for this one because i have a service running and if i changed the permission the activity is recreated and i need to know that the permission was disable manually then user enable it again in the application information
http://i.stack.imgur.com/vxWKu.png | <android><android-6.0-marshmallow> | 2016-03-29 08:50:02 | LQ_EDIT |
36,280,912 | Calculating summations | <p><a href="http://i.stack.imgur.com/YkWea.png" rel="nofollow">Link to question</a></p>
<p>I am struggling so answer the following question. I think the reason I am not doing it correctly is because i starts at 0 rather than 1, but I am not sure how to do it.</p>
| <algorithm><math> | 2016-03-29 09:53:15 | LQ_CLOSE |
36,281,428 | Inserting dynamic table values from PHP array to mysql table | Need help in inserting dynamic fields and values into mysql db table in PHP.
sampe data
$data[]=array('client'=>$clientname, 'amount' => 12000,'balance'=>6000, 'term'=>6,'maturitydate'=>'2016-05-31')
parameters passed to get the above data : branch = branchid, date =cutoffdate
Here's the table structure where I need to insert the above data.
Fields : branch
date
account_no
field
value
the first two fields values came from the parameters passed, account_no comes from the data after the querying the db using the passed param, for the field value should come from the array index and value is the index value. Been looking around the web for some possible solutions but I cannot find one.
Any help will be highly appreciated. thank you | <php><mysql> | 2016-03-29 10:16:12 | LQ_EDIT |
36,282,583 | How to block a thread efficiently until a particular condition is met | <p>I am working on a multi-threaded server application in Linux using pthread library.For each client being connected there are two threads as I make two connection from device and one thread has dependency on other.until a particular condition is met First thread loop continuously in a while loop.when the condition is met the second thread sets the flag and the first thread based on that breaks the while loop and perform the required tasks.</p>
<p>Is running a While loop continuously in a Thread until a particular condition is met a good approach.If not please specify a better approach.</p>
| <c><linux><multithreading> | 2016-03-29 11:08:04 | LQ_CLOSE |
36,284,370 | (APACHE) Apache blocking my acess to WEBSITE | <p>I am having some couple problems with apache that is blocking my ip adress.
In my company we have an Android App made in Titanium SDK that constantly makes alot of server requests, most of this requests is GET requests, but we have around 40000 images to download , so we do 40000 requests in server constantly for each device in the same IP , after some time , the IP will block, but when I try access from other IP , it works fine. However, when i restart the apache server , the access got back again. There's any way to configure the apache to not block my ip in apache? </p>
| <php><android><apache><cakephp><titanium-mobile> | 2016-03-29 12:31:36 | LQ_CLOSE |
36,284,787 | Organizing functions with inter dependencies; | <p>I would like to write a set of cpp functions for importing from a file type into a data structure which has inter dependencies to each other. As I don't need any member variables to remember anything after importing the file, is it a good idea to create a class with just static functions or create a namespace and put all functions into it without class. </p>
| <c++> | 2016-03-29 12:50:00 | LQ_CLOSE |
36,285,422 | App crashes on android 6.0 | I have been getting this this weird Force Close of my app when someone on android 6.0 tries to upload a photo on my app while the app works compeletly fine on Android Kitkat, here is my logcat
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: FATAL EXCEPTION: main
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: Process: com.ummahtalk.network, PID: 14882
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:53790 flg=0x1 }} to activity {com.ummahtalk.network/com.ummahtalk.network.activities.posts.PublishActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=14882, uid=10166 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:3743)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3786)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.-wrap16(ActivityThread.java)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5466)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=14882, uid=10166 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1620)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:493)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:435)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.ummahtalk.network.helpers.FilePath.getDataColumn(FilePath.java:117)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.ummahtalk.network.helpers.FilePath.getPath(FilePath.java:82)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.ummahtalk.network.activities.posts.PublishActivity.setImageUriValue(PublishActivity.java:468)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.ummahtalk.network.activities.posts.PublishActivity.onActivityResult(PublishActivity.java:238)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:6456)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:3739)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3786)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.-wrap16(ActivityThread.java)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5466)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-29 18:36:33.627 14882-14882/com.ummahtalk.network E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
| <java><android> | 2016-03-29 13:16:16 | LQ_EDIT |
36,285,594 | I've wrote combination program in c++ but there is no output ,can any one tell why? | this combination program without result, can anyone help me ?
`#include <iostream>
#include<cstring>
using namespace std;
void comb(char *inp)
{
int i, j, k;
int len = strlen(inp);
for (i = 0; i < len - 2; i++)
{
for (j = i + 1; j < len - 1; j++)
{
for (k = j + 1; k < len; k++)
printf("%c%c%c\n", inp[i], inp[j], inp[k]);
}
}
}
int main ()
{
string str,z;
std::cout<<"enter your string";
cin>>str;
z=comb(str);
return 0;
}`
| <c++><combinations> | 2016-03-29 13:22:33 | LQ_EDIT |
36,285,649 | create live wallpaper using unity3d? | <p>Can anyone tell me which asset I have to use to create a live wallpaper for android using <strong>unity3d</strong>? I'm using latest version of unity which is <strong>5.3.4</strong> .</p>
| <unity3d> | 2016-03-29 13:24:40 | LQ_CLOSE |
36,285,654 | cleaning/parsing JSON with python | Can anyone help to clean below JSON
"1-Transaction Transfer Info Segment-F2":{"Selling Store Number":"01818","Transaction Date":"2014-09-08","Transaction Time":"05:45:49","Transaction Service Type":"I","IP Time Id":"118180546186"}
I want to clean this json as below
1-Transaction Transfer Info Segment-F2 =>1_Transaction_Transfer_Info_Segment_F2
Selling Store Number => Selling_Store_Number,Transaction Service Type => Transaction_Servic_Type,IP Time Id => IP_Time_Id | <python><json><parsing> | 2016-03-29 13:24:49 | LQ_EDIT |
36,287,310 | Why do we need extension method if inheritance is already there..? | <p>I am facing this question regularly in interview. But I am not getting it's answer anywhere.Please help me.</p>
| <c#> | 2016-03-29 14:31:09 | LQ_CLOSE |
36,288,176 | Substring of string is not working the way i want | <p>I have this code here: </p>
<pre><code>String line1 = "part1, part2, part3, part4";
</code></pre>
<p>and i want to extract part 2.
so i tried this:</p>
<pre><code>String extractedPart = line1.substring(line1.indexOf(","), line1.indexOf(",", line1.indexOf"," +1)));
System.out.println(extractedPart);
</code></pre>
<p>But it's not printing out anything.
Can someone help me with that?</p>
| <java><substring> | 2016-03-29 15:08:57 | LQ_CLOSE |
36,288,630 | How to retrieve the last row of a table and insert it into another table | <p>i want to retrieve a last row added in table A and insert all row into table B. The 2 table are in different database.My code:</p>
<pre><code> $db=new PDO('mysql:host=localhost;dbname=service','root','');
$db1=new PDO('mysql:host=localhost;dbname=service1','root','');
$req = $db->query('SELECT * FROM `service`.`myusers` WHERE ID NOT IN (SELECT ID FROM `service1`.`myusers`)');
$reqt = $req->fetch();
$count = $req->rowCount();
if($count){
$db1->query('SET NAMES UTF8');
$reqa=$db1->prepare('insert into myusers values(?,?,?,?,?,?)');
$db1->query('SET NAMES UTF8');
$reqa->bindParam(1,$reqt['ID']);
$reqa->bindParam(2,$reqt['Prénom']);
$reqa->bindParam(3,$reqt['LastName']);
$reqa->bindParam(4,$reqt['dateDebut']);
$reqa->bindParam(5,$reqt['identifient']);
$reqa->bindParam(6,$reqt['fid']);
$reqa->execute();
return true;
}else{
return false;
}
</code></pre>
<p>But doesn't work.</p>
| <php><mysql> | 2016-03-29 15:28:04 | LQ_CLOSE |
36,290,426 | Optimize and inline calls via function pointer | <p>I wanted to see if the compiler was clever enought to inline calls via a function pointer.</p>
<p>If I compile using gcc 4.8 with any -Os or -O2 then the compiler will inline apply1 and apply2 into main, but will additionally for apply2 it removes the indirect call via function pointer and inlines add1 into the code too. In apply1 it does not. In general it seems to be the case that declaring my function static allows this optimization within it, but non static does not.</p>
<p>Is there any fundemental difference that explains this?</p>
<p>This is now mostly for curiosity but motivated by some high performance code I need to write and so would like to understand what might provoke this difference.</p>
<p>Although this code is C I get the same if I compiler as C++ too.</p>
<pre><code>#include <stdio.h>
int add1(int a)
{
return a + 1;
}
void apply1(int lower, int upper, int (* func)(int))
{
for (int i = lower; i < upper; i++)
{
printf("%d = %d\n", i, func(i));
}
}
static void apply2(int lower, int upper, int (* func)(int))
{
for (int i = lower; i < upper; i++)
{
printf("%d = %d\n", i, func(i));
}
}
int main()
{
apply1(0, 10, add1);
apply2(0, 10, add1);
}
</code></pre>
| <c++><c><optimization> | 2016-03-29 16:52:41 | LQ_CLOSE |
36,290,431 | Is it safe to reinstall Python on El Capitan? | <p>Is it safe to reinstall Python 2.7.10 on El Capitan Mac OS X?
I reinstalled my Python 2.7.10, and updated to Python 2.7.11
I reinstalled with command 'brew reinstall python'
Thank you</p>
| <python><macos><reinstall> | 2016-03-29 16:52:51 | LQ_CLOSE |
36,291,241 | How to stop program from running? | <p>I included three break; in three different cases. I tested case 2, it stopped the program; however for case 1, it goes on and on even tho it has break;. I tried every possible solution to fix it. I couldn't figure it out.</p>
<p>how can I fix it?</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
// self-referential structure
struct queueNode {
char data; // define data as a char
struct queueNode *nextPtr; // queueNode pointer
struct queueNode *prevPtr;
}; // end structure queueNode
typedef struct queueNode QueueNode;
typedef QueueNode *QueueNodePtr;
// function prototypes
void printQueue( QueueNodePtr currentPtr );
int isEmpty( QueueNodePtr headPtr );
char dequeue( QueueNodePtr *headPtr, QueueNodePtr *tailPtr );
void enqueue( QueueNodePtr *headPtr, QueueNodePtr *tailPtr,
char value );
void instructions( void );
void reverse( QueueNodePtr currentPtr);
// function main begins program execution
int main( void )
{
QueueNodePtr headPtr = NULL; // initialize headPtr
QueueNodePtr tailPtr = NULL; // initialize tailPtr
unsigned int choice; // user's menu choice
char item; // char input by user
instructions(); // display the menu
printf( "%s", "? " );
scanf( "%u", &choice );
// while user does not enter 3
while ( choice != 3 ) {
switch( choice ) {
// enqueue value
case 1:
printf( "%s", "Enter a character: " );
scanf( "\n%c", &item );
enqueue( &headPtr, &tailPtr, item );
printQueue( headPtr );
reverse( headPtr );
break;
// dequeue value
case 2:
// if queue is not empty
if ( !isEmpty( headPtr ) ) {
item = dequeue( &headPtr, &tailPtr );
printf( "%c has been dequeued.\n", item );
} // end if
printQueue( headPtr );
reverse( headPtr );
break;
default:
puts( "Invalid choice.\n" );
instructions();
break;
} // end switch
printf( "%s", "? " );
scanf( "%u", &choice );
} // end while
puts( "End of run." );
} // end main
// display program instructions to user
void instructions( void )
{
printf ( "Enter your choice:\n"
" 1 to add an item to the queue\n"
" 2 to remove an item from the queue\n"
" 3 to end\n" );
} // end function instructions
// insert a node in at queue tail
void enqueue( QueueNodePtr *headPtr, QueueNodePtr *tailPtr,
char value )
{
QueueNodePtr newPtr; // pointer to new node
QueueNodePtr currentPtr;
QueueNodePtr previousPtr;
newPtr = (QueueNodePtr)malloc(sizeof(QueueNode));
if ( newPtr != NULL ) { // is space available
newPtr->data = value;
newPtr->nextPtr = NULL;
newPtr->prevPtr = NULL;
previousPtr = NULL;
currentPtr = *headPtr;
while(currentPtr != NULL && value > currentPtr-> data)
{
previousPtr = currentPtr;
currentPtr = currentPtr->nextPtr;
}
if(previousPtr == NULL)
{
newPtr->nextPtr = *headPtr;
if(*headPtr != NULL)
(*headPtr)->prevPtr = newPtr;
*headPtr = newPtr;
}
else
{
newPtr->prevPtr = previousPtr;
previousPtr->nextPtr = newPtr;
newPtr->nextPtr = currentPtr;
if(currentPtr != NULL)
currentPtr->prevPtr = newPtr;
}
} // end if
else {
printf( "%c not inserted. No memory available.\n", value );
} // end else
} // end function enqueue
// remove node from queue head
char dequeue( QueueNodePtr *headPtr, QueueNodePtr *tailPtr )
{
char value; // node value
QueueNodePtr tempPtr; // temporary node pointer
QueueNodePtr currentPtr;
QueueNodePtr previousPtr;
if(value == ( *headPtr )->data)
{
tempPtr = *headPtr;
*headPtr = ( *headPtr )->nextPtr;
free(tempPtr);
return value;
}
else
{
previousPtr = *headPtr;
currentPtr = (*headPtr)->nextPtr;
while(currentPtr != NULL && currentPtr->data != value)
{
previousPtr = currentPtr;
currentPtr = currentPtr->nextPtr;
}
if(currentPtr !=NULL)
{
tempPtr = currentPtr;
previousPtr->nextPtr= currentPtr->nextPtr;
free(tempPtr);
return value;
}
}
return '\0';
} // end function dequeue
// return 1 if the queue is empty, 0 otherwise
int isEmpty( QueueNodePtr headPtr )
{
return headPtr == NULL;
} // end function isEmpty
// print the queue
void printQueue( QueueNodePtr currentPtr )
{
// if queue is empty
if ( currentPtr == NULL ) {
puts( "List is empty.\n" );
} // end if
else {
puts( "The list is:" );
// while not end of queue
while ( currentPtr != NULL ) {
printf( "%c --> ", currentPtr->data );
currentPtr = currentPtr->nextPtr;
} // end while
puts( "NULL\n" );
} // end else
} // end function printQueue
void reverse(QueueNodePtr currentPtr )
{
QueueNodePtr tempPtr = NULL;
while(currentPtr != NULL)
{
tempPtr = currentPtr;
currentPtr = currentPtr->nextPtr;
}
printf("\nThe list in reverse is:");
printf("NULL");
currentPtr = tempPtr;
while(currentPtr != NULL)
{
printf(" <-- %c", currentPtr->data);
}
printf("NULL\n");
}
</code></pre>
| <c> | 2016-03-29 17:35:03 | LQ_CLOSE |
36,293,871 | Assebly asciiz pcspim | Write a program that reads 10 numbers from the keyboard and store them in memory. Then it prints the numbers in reverse order and print their sum. In addition to indicate a variable which takes as argument a letter of the alphabet and print the ascii number.Can you help ?
.data
pin:.space 40
.text
.globl main
main: addi $20, $0, 10
addi $17, $0, 0
addi $6, $0, 0
loop: addi $2, $0, 5
syscall
add $7, $0, $2
sw $7, pin($6)
addi $17, $17, 1
addi $6, $6, 4
bne $20, $17, loop
addi $17, $0, 0
addi $6, $0, 0
loop1:lw $8,pin($6)
addi $2,$0,1
add $4,$8,$0
syscall
addi $17,$17,1
addi $6,$6,4
bne $17,$20,loop1
j main | <assembly><pcspim> | 2016-03-29 19:52:12 | LQ_EDIT |
36,294,538 | trouble with friend function | <p>so my program is that i want the user to enter information about a board so everything is working except the part where i need the user to enter the value of attitude then add another number to increase that attitude so I'm stuck at this. As you can see I declared this function as a friend but when I enter the number that I need to increase it to the value of attitude) it stays the same! I hope I made clear the problem I'm facing! and I'd appreciate some help</p>
<pre><code>#ifndef BOARD_H
#define BOARD_H
class Board {
friend void incAttitude(Board &);
public:
friend void incAttitude(Board &);
static int boardcount;
Board(int=5,int=3,double=1.5,char* ='\0');
~Board();
Board &setBoard(int,int,double,char*);
char getLocation();
Board &print();
double surface();
private:
const int length;
int width;
double attitude;
char location[30];
};
#endif
#include<iostream>
#include<cstring>
#include<string>
#include<assert.h>
using namespace std;
#include "Board.h"
int Board::boardcount=0;
Board::Board(int l,int w,double a,char* lo)
: length(l)
{
width=w;
attitude=a;
location[0]='\0';
boardcount++;
}
Board::~Board(){
boardcount--;
}
Board &Board::setBoard(int l,int w,double a,char* lo)
{
width=(w>=2 && w<=5)?w:3;
attitude=(a>=1.5 && a<=2.8)?a:1.5;
strncpy_s(location,lo,29);
location[29]='\0';
return *this;
}
char Board::getLocation(){
return *location;
}
double Board::surface(){
return length*width;
}
void incAttitude(Board &h)
{
double incAttitude;
cout<<"enter to increase attitude "<<endl;
cin>>incAttitude;
h.attitude+=incAttitude;
cout<<"the attitude of the board after the increase : "<<h.attitude<<endl;
}
Board &Board::print(){
cout<<"the length of the boarad : "<<length<<endl;
cout<<"the width of the board : "<<width<<endl;
cout<<"the height of the board : "<<attitude<<endl;
cout<<"the location of the board : "<<location<<endl;
cout<<"the surface of the board : "<<surface()<<endl;
return *this;
}
int main(){
Board hh;
Board *boardptr;
int count,len,wid;
double att;
char locat[30];
cout<<"how many boards do you need to create ? "<<endl;
cin>>count;
boardptr = new Board[count];
assert(boardptr!=0);
for (int i=0; i<count; i++){
cout << "Enter the length: ";
cin >>len;
cout << "Enter the width: ";
cin >> wid;
cout << "Enter the attitude: ";
cin >> att;
incAttitude(hh);
cout<<"Enter the location: ";
cin >>locat;
boardptr[i].setBoard(len,wid,att,locat);
cout<<"------------------------------------------"<<endl;
if (strcmp("NewYork",locat) == 0)
{
boardptr[i].setBoard(len,wid,att,locat).print();
}
}
delete [] boardptr;
system("pause");
return 0;
}
</code></pre>
| <c++><friend-function> | 2016-03-29 20:31:44 | LQ_CLOSE |
36,296,911 | NSDictionary use | <p>I need some kind of help with an explanation to understand how use a NSDirectory, i don´t know if is possible to insert a NSString or NSDictionary's data from a class "A" in another NSDictionary in class B</p>
<p>Class A </p>
<pre><code>String
NSString *TwitterToken = accessTokenTwt;
NSString *twitterSecretToken = accessTokenSecret;
NSDictionary take the tokenExpires or another
- (NSMutableDictionary *)tokenAsDictionary
{
NSMutableDictionary *tokenDictionary = [[NSMutableDictionary alloc] init];
tokenDictionary[@"key"] = self.key;
tokenDictionary[@"secret"] = self.secret;
tokenDictionary[@"tokenExpires"] = @(self.tokenExpires);
tokenDictionary[@"requestAuthUrl"] = self.requestAuthUrl;
if (self.verifier) {
tokenDictionary[@"verifier"] = self.verifier;
}
return tokenDictionary;
}
</code></pre>
<p>Class B </p>
<pre><code>NSMutableDictionary *args = [[NSMutableDictionary alloc] init];
[args setObject: [Insert here data from class A] forKey:@"access_token"];
[args setObject: @"1" forKey:@"expires"];
</code></pre>
| <ios><objective-c><nsdictionary><nsmutabledictionary> | 2016-03-29 23:25:40 | LQ_CLOSE |
36,300,191 | Get Play store All search result with PHP scraper | **Summery :**
I want to fetch all Play store search result, problems is that, Apps that show after scroll that are not show in PHP file_get_content().
**Detail:**
I'm trying to make a php based play store scraper.
I check all stackoverflow answers and githup example, but they all are old, and not working,, Because previously Play store use "start" parameter for more apps/Next page.. Now play store show more apps on scroll
So after so many research, i decide to make my own scraper,
**What i am doing:**
file_get_contents() : to fetch the query url from play store
//i try with PHP:
$result = file_get_content( "https://play.google.com/store/search?q=football" );
// its only return 20 apps result, i want to get 250 result,..
Play store shows only 20 apps on the query result, more apps are shown ONLY on scrolling.
I try to get google ajax URL from "network tab", But google use token parameter for next scroll page...
**Question:**
**How i get scroll content with PHP.**
**How i get play store all search result.**
**How i fetch page content with PHP that show with js.** | <php><jquery><scroll><web-crawler><scrape> | 2016-03-30 05:11:16 | LQ_EDIT |
36,301,824 | On click listener doesn't wait for touch up | <p>The onClick event is fired as soon as we touch down and doesn't wait till the up event.</p>
<pre><code> @Override
public View getPage(int position, View convertView, ViewGroup parent, final Topic item1, final Topic item2, CloseListener closeListener) {
final FriendsHolder holder;
if (convertView == null) {
holder = new FriendsHolder();
convertView = getActivity().getLayoutInflater().inflate(R.layout.friends_merge_page, parent, false);
holder.leftAvatar = ButterKnife.findById(convertView,R.id.first);
holder.rightAvatar = ButterKnife.findById(convertView,R.id.second);
holder.leftAvatar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
myParentActivity.setUrl(item1.getMainLink());
}
});
holder.rightAvatar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
myParentActivity.setUrl(item2.getMainLink());
}
});
</code></pre>
<p>The left and right avatar views of the holder are the views in question. There is a flip listener on them too. But as soon as I touch them the click event gets fired.</p>
| <java><android><android-recyclerview><onclicklistener><viewflipper> | 2016-03-30 07:03:00 | LQ_CLOSE |
36,302,912 | If..else loop and array does not follow condition for php | I had problem with this particular code. The conditions are:
~When `$rows['Machine#']` is not in array, push in `$machineArr` array and unset the `$totalTimeArr` array.
~When `$rows['Machine#']` is in the array, push `$rows['TotalTime']` into `$totalTimeArr` array for addition.
~`$graphArr[]` should be updated (for `array_sum($totalTimeArr)`) first before push into array.
I now have problems regarding the third condition. It does not calculate first, instead it pushes the first data input. I have tried using `do while` loop, putting `$graphArr[] = '["'.$rows['Machine#'].'",'.array_sum($totalTimeArr).']';` outside the `if else` loop, but this seems to be the closest I can get to what its supposed to be. Other codes doesnt seem to have problems and work well. Appreciate your recommendations/suggestions/assistance. Thanks. Below is the code.
while ($rows = mysqli_fetch_array($conn))
{
if(!(in_array($rows['Machine#'], $machineArr)))
{
unset($totalTimeArr);
$machineArr[] = $rows['Machine#'];
$totalTimeArr[] = $rows['TotalTime'];
$graphArr[] = '["'.$rows['Machine#'].'",'.array_sum($totalTimeArr).']';
}
else if(in_array($rows['Machine#'], $machineArr))
{
$totalTimeArr[] = $rows['TotalTime'];
}
} | <php><arrays> | 2016-03-30 07:59:52 | LQ_EDIT |
36,303,606 | Brain teaser - php array manipulation | I have following array:
<pre>
array(174) {
[0]=>
string(5) "3.0.3"
[1]=>
string(5) "3.0.2"
[2]=>
string(5) "3.0.1"
[3]=>
string(5) "3.0.0"
[9]=>
string(5) "2.9.5"
[10]=>
string(5) "2.9.4"
[11]=>
string(5) "2.9.3"
[12]=>
string(5) "2.9.2"
[13]=>
string(5) "2.9.1"
[14]=>
string(5) "2.9.0"
[18]=>
string(6) "2.8.11"
[19]=>
string(6) "2.8.10"
[20]=>
string(5) "2.8.9"
}
</pre>
I need to find the highest 3rd number for unique pair of first two numbers x.x. With this example the expected result must be 3.0.3, 2.9.5, 2.8.11.
| <php><arrays><semantic-versioning> | 2016-03-30 08:34:01 | LQ_EDIT |
36,304,221 | PHP trim doesn't work in my case | <p>I have the next situation:</p>
<pre><code>$a = ' 0226 ';
</code></pre>
<p>I'm trying to remove whitespaces from the beginning and end of the string:</p>
<pre><code>print_r(trim($a));
</code></pre>
<p>and expected output is:</p>
<pre><code>'0226'
</code></pre>
<p>Here are results of <code>var_dump</code> and <code>urlencode</code> of above string:</p>
<pre><code>print_r(urlencode($a)); // %C2%A0+0226+%C2%A0
var_dump($a) // <pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000'>' 0226 '</font> <i>(length=10)</i>
</pre>
</code></pre>
| <php> | 2016-03-30 09:04:43 | LQ_CLOSE |
36,304,631 | Add a class to a div at a condition | The following is my code I wanted to add a class to a div when a certain condition is true. Tried jquery also but didn't worked. My code is as follows
$('.addressStatus').each(function(index, value){
var el = 0;
if($(this).data('status') == true){
el = $(this).data('param1');
console.log(el);
var id = document.getElementById('statusID'+el);
id.classList.add('inactiveAddrsColor');
// id.className += id.className ? ' inactiveAddrsColor' : 'inactiveAddrsColor';
//element.classList.add('inactiveAddrsColor');
// $('statusID'+el).addClass('inactiveAddrsColor');
}
}); | <javascript><jquery> | 2016-03-30 09:23:29 | LQ_EDIT |
36,306,137 | How to display only numbers in a coulmn if it has strings and numbers. if only string is present then the column should left as empty | Please help me to find a Sql query/ procedure for below request.
I am having column A which is having below values in each row
COLUMN A
My toy is in ('111000','1112220')
My toy is this
My toy is in ('111000')
My toy is this
My toy is in ('111002')
Now i need a query to display the column A with value containing only numbers, If the row is not having any number then it should be left as empty like below
COLUMN A
111000|1112220
111000
111002
if it is a store procedure/ a query any thing is fine for me. Please help me on this | <sql><sql-server><stored-procedures> | 2016-03-30 10:28:02 | LQ_EDIT |
36,307,510 | PHP: IF() Euqal TO Not working | `if($_SESSION['auth'] != 2 || $_SESSION['auth'] != 3){
header("location:../login/login.php");
}`
what am i doing wrong, ist keep sending me back,
ist only when session is 1 or not set, it should send me back
best regrads kevin | <php><session><if-statement> | 2016-03-30 11:30:20 | LQ_EDIT |
36,308,101 | How to create a stopwatch in c#? | <p>How to create a stopwatch in c# (visual studio 2012)that starts when you start typing in a a text box and stops when enter is pressed? It should start again when i start typing another word and end again on pressing enter, then display the times recorded for each word. </p>
<p>The following example demonstrates how to use the Stopwatch class to determine the execution time for an application.
C#</p>
<pre><code>using System;
using System.Diagnostics;
using System.Threading;
class Program
{
static void Main(string[] args)
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
Thread.Sleep(10000);
stopWatch.Stop();
// Get the elapsed time as a TimeSpan value.
TimeSpan ts = stopWatch.Elapsed;
// Format and display the TimeSpan value.
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
Console.WriteLine("RunTime " + elapsedTime);
}
}
</code></pre>
| <c#><visual-studio-2012><timer><stopwatch> | 2016-03-30 11:55:22 | LQ_CLOSE |
36,308,733 | unable to blink led 3 times in arduiono program | I want to run the loop for three times to blink the led 3 times in arduino programme. How to run the loop for 3 times and exit from the loop.how to use return statement in loop?
int LedPin = 13;
int Loops = 1;
void setup() {
pinMode(LedPin, OUTPUT);
}
void loop() {
digitalWrite(13, LOW);
Loops = Loops + 1;
if ( Loops < 3 )
{
digitalWrite(13, HIGH);
delay(2000);
}
else {
digitalWrite(13, LOW);
exit(0);
}
} | <c><loops><arduino> | 2016-03-30 12:21:24 | LQ_EDIT |
36,308,780 | how to present a frequency table from Rstudio in MS Word nicely | So, I copied this frequency table from R in MS Word:
I A I B II A II B III A III A III B IV
128 73 61 59 1 166 86 463
How can I make it look nicer in a MS Word document?
No Latex please, it should be written in an MS document.
Thanks in advance! | <r><ms-office> | 2016-03-30 12:23:36 | LQ_EDIT |
36,310,073 | Flowchart to HTML and CSS online tool? | <p>I need a tool where the user can draw an flowchart easily, and export this to a HTML and CSS file.
My intention to save this HTML code in a database, and get this from my android app, and show this in a Webview.
Do you know some flowchart tool for to do that? </p>
<p>Thank you!</p>
| <android><html><css><flowchart> | 2016-03-30 13:18:53 | LQ_CLOSE |
36,310,761 | Creating a bigger data frame by joining multiple data frames | <p>I currently have multiple data frames (named cont, cont2 .... cont7), and need to combine them</p>
<p>Each data frame has 2 columns; date and a mean temperature value (taken from a netcdf file)</p>
<p>The dates are monthly values, in
cont = 1951-1 to 1960-12
cont7 = 2011-1 to 2014-12
(basically monthly values split into groups of 10 years, from Jan 1951- Dec 2014)</p>
<p>How can I extent my data frame so all values are in 1 table? I want to make it continuous so as to plot a time series</p>
| <r> | 2016-03-30 13:46:29 | LQ_CLOSE |
36,311,229 | How to show double 00 like 00:00:59 in C++? | <p>I'm trying to make a time like this:
00:00:59;
But I can't get it to show 00 instead it show only one 0.</p>
| <c++> | 2016-03-30 14:04:36 | LQ_CLOSE |
36,312,028 | Submit an array string from codename one to PHP using connection request | <p>Am fetching data from mysqlite to a string array which i want to submit to PHP then update a mysql table.
Any easy way out, because doesn't seem to work?</p>
| <php><codenameone> | 2016-03-30 14:34:35 | LQ_CLOSE |
36,312,804 | Html : how to get value of input from form? | <p>I have got the following code:</p>
<pre><code><form method='POST' onsubmit='javascript:searchAndUpdateGrid(GET_THE_VALUE_OF_INPUT);return false;'
<input type="text" id="inputField" class="form-control" placeholder="Type something...">
</form>
</code></pre>
<p>I want to launch the function searchAndUpdateGrid with the value entered by the user in the input field. How can I do that ? (I would like to avoid to get it from Javascript)</p>
<p>Thanks !</p>
| <javascript><jquery><html> | 2016-03-30 15:07:09 | LQ_CLOSE |
36,313,229 | Displaying Order ID on checkout success page | <p>I'll like the order id to be echoed on checkout success page of an opencart store. How do I do this? There are similar threads to this but I've tried the suggestions offered, didn't work for me. So I'm including links to the relevant codes here:</p>
<p>My catalog/controller/checkout/success.php is at <a href="http://pastebin.com/wPWau0Kv" rel="nofollow">http://pastebin.com/wPWau0Kv</a></p>
<p>My /template/common/success.tpl is at <a href="http://pastebin.com/5Jfpkur0" rel="nofollow">http://pastebin.com/5Jfpkur0</a></p>
<p>Thanks.</p>
| <opencart> | 2016-03-30 15:25:42 | LQ_CLOSE |
36,315,844 | Javscript [object Object] see content | I have maybe a real simple problem, but i need to know how to do this.
My ambitions:
<!-- begin snippet: js hide: false -->
<!-- language: lang-js -->
var test_obj = {
'test' : 't',
'test2' : 't2'
}
/*
when i log a object it often gives me somthing like this:
[object Object]
but if i want to take a look into the object, i want to see (for test_obj):
{ 'test' : 't', 'test2' : 't2' }
*/
<!-- end snippet -->
So how can I log an ibject that it shows me what is in it ?
| <javascript><object><console.log> | 2016-03-30 17:34:29 | LQ_EDIT |
36,316,718 | I am new to python and I am stuck. it shows error TypeError: unsupported operand type(s) for +=: 'int' and 'str' | shopping_list = ["banana", "orange", "apple"]
stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
}
prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3
}
def compute_bill(food):
total = 0
for item in food:
total += item
return total
for key in prices:
print compute_bill(key) | <python> | 2016-03-30 18:21:44 | LQ_EDIT |
36,316,772 | A project with an output type of class library cannot be started | <p>I am given a source control which comprises class libraries only.
How should I run the project?</p>
| <c#> | 2016-03-30 18:24:42 | LQ_CLOSE |
36,316,840 | Merge corresponding elements of 2 lists in python | <p>List 1:</p>
<pre><code>['buying','maint']
</code></pre>
<p>List 2:</p>
<pre><code>[['med', 'vhigh', 'low', 'high'],['med', 'small', 'big']]
</code></pre>
<p>Expected_output:</p>
<pre><code>[['buying_med', 'buying_vhigh','buying_low','buying_high'],['maint_med','maint_small','maint_big']]
</code></pre>
<p>Please let mw know on how to do this in python 3.</p>
| <python><python-3.x> | 2016-03-30 18:28:21 | LQ_CLOSE |
36,317,569 | haskell couldnt match expeted type | On this code there's no way to do it polymorphic:
data NumericExpr e = Var e | Const e | Times [e] | Div e e deriving (Show,Read)
readCommand:: a -> b
readCommand entrada = Var 3
it gives me a big error which I can't copy:
couldn't match expected type b with actual type NumericExpr e0 b is a rigid type variable bound by the type signature for readcommand :: a -> b
| <haskell><compilation> | 2016-03-30 19:06:51 | LQ_EDIT |
36,318,423 | sql for loop to include returned values as part of a sql insert | i need to insert rows from another query into a single row that is then inserted into another table. it works if there is only one row returned; however, if the row count is greater than 1 it fails. i can't figure out the for loop - indicated with the --** section.
declare @cn as int, @i as int
set @cn = 569
declare @dM table(dM varchar(max))
declare @rowNum table (rowNum int)
set @i = 0
insert @rowNum
exec ('select count(*) from table1 where c = ' + @cn)
--select rowNum from @rowNum as NumberRows --return 2 rows
if (select rowNum from @rowNum as NumberRows) > 1
begin
insert @dM
exec ('select d.d + '' '' + o.o + '' '' + d.v as rtM from table where c = ' + @countNumber)
--returns 2 rows as rtM so there will be two inserted rows
--going now okay
--going later okay
--**
--while (@i <= (select count(*) from @rowNum)) --didn't work
--for each row returned in rtM in need to include as part of the overall insert
insert into table2 (cn, rtM, idate)
select
@cn
,'Message is: ' + (select dM from @dM) + ' - the message.'
cz.idate + ' ' + qw.txt
from table3 as cz
inner join table4 as qw on cz.id = qw.id
where cz.cn = @cn
--set @i = @i + 1
--**
end
else
begin
--there is only 1 row returned from rtM so there will be a single inserted row
insert @dM
exec ('select d.d + '' '' + o.o + '' '' + d.v as rtM from table where c = ' + @countNumber)
insert into table2 (cn, rtM, idate)
select
@cn
,'Message is: ' + (select dM from @dM) + ' - the message.'
cz.idate + ' ' + qw.txt
from table3 as cz
inner join table4 as qw on cz.id = qw.id
where cz.cn = @cn
end
| <sql><sql-server><tsql> | 2016-03-30 19:51:50 | LQ_EDIT |
36,319,615 | Write the SQL code that will list Physician-Person appointments only ONCE. | This one is confusing me?
This is what I have so far :
<code>SELECT DISTINCT Appointment_date_time FROM Appointment
INNER JOIN Person ON
Appointment.Person_ID = Person.Person_ID
INNER JOIN Physician ON
Physician.Physician_ID = Person.Physician_ID
HAVING COUNT(*) < 1</code> | <sql><sql-server> | 2016-03-30 20:58:50 | LQ_EDIT |
36,319,659 | Putting strings in Python lists | <p>I am trying to make a dynamic map for a text-based RPG that I am coding, so I tried this array:</p>
<pre><code>landscape = [['-,-,-,-,-,-,-,-,-,-,-,-,-,-,X']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['-,-,-,-,-,-,-,-,-,-,-,-,-,-,-']
['O,-,-,-,-,-,-,-,-,-,-,-,-,-,-']]
</code></pre>
<p>However, it gave an error message saying that str objects cannot be placed in arrays. Is there a way to fix this?</p>
| <python> | 2016-03-30 21:01:22 | LQ_CLOSE |
36,319,676 | I need help finding small errors in my python code | <p>I wrote this program, and I've been having a bunch of issues. I don't have very much experience with python, so I'm sure I made a bunch of dumb syntax errors. Please just help me find all of the errors in my code!</p>
<pre><code>import string
num_ltr = []
ltr_num = []
num = 1
for ltr in string.ascii_lowercase:
num_ltr[num] = ltr
ltr_num[ltr] = num
num += 1
def print_menu():
return '1. Translate a string to numbers'
return '2. Translate numbers to a string'
return '3. Quit'
def ltr_to_num(s, ltr_num):
for char in s:
print ltr_num[char]
print
def num_to_ltr(num_ltr, s):
num_list = s.split()
sentence = 0
for num in num_list:
if num.isdigit():
sentence = num_ltr[num]
else:
sentence += num
user_choice = 0
while user_choice != 3:
print print_menu()
user_choice = raw_input("> ")
if user_choice = 1:
s = raw_input('Enter a sentence: ')
num_to_ltr(s,num_ltr)
elif user_choice = 2:
s = raw_input('Enter the numbers separated by spaces: ')
num_to_ltr(s,num_ltr)
elif user_choice != 3:
print "I don't recognize that choice."
print "Goodbye!"
</code></pre>
| <python><debugging> | 2016-03-30 21:02:28 | LQ_CLOSE |
36,320,686 | Best way to create an account system in C# | <p>I am trying to create a system like LinkedIn but a simplified one. I tried doing so, but I came to realization that it will not be possible until I create something like an account system because at the moment the user will login - ok but then what? How is he going to be able to upload CV under his name. I haven't totally understood how it should work and as you can already probably tell I am not very experienced. ;p</p>
<p>So my question here is: How can create a system where the user will register and enter personal details, work experience and upload CV? Employers will have to register as employers and search employees with being able to filter them by keywords such as "good with computers". At the same time, be able to view their profile.
Thank you in advance! </p>
| <c#><mysql><sql><winforms> | 2016-03-30 22:13:47 | LQ_CLOSE |
36,322,714 | Something I'm misunderstanding about rand() % i? | <pre><code>int main() {
const int n = 5;
int A[n][n]; // value of each cell
int V[n][n]; // total value of each cell
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
V[i][j] = 0; // initialize total value of each cell equal to zero
A[i][j] = rand() % 10; // set each cell's value equal to some number 0-9
printf("%i ", A[i][j]);
}
printf("\n");
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (i == 0 && j == 0)
{
V[i][j] = A[i][j];
}
else if (i == 0)
{
V[i][j] = V[i][j - 1] + A[i][j];
}
else if (j == 0)
{
V[i][j] = V[i - 1][j] + A[i][j];
}
else
{
if (V[i][j - 1] > V[i - 1][j])
{
V[i][j] = V[i][j - 1] + A[i][j];
}
else
{
V[i][j] = V[i - 1][j] + A[i][j];
}
}
}
}
printf("\n");
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (V[i][j] < 10) printf(" %i ", V[i][j]);
else printf("%i ", V[i][j]);
}
printf("\n");
}
cin.get();
</code></pre>
<p>}</p>
<p>This outputs <a href="http://i.imgur.com/Ak3KpPr.png" rel="nofollow">http://i.imgur.com/Ak3KpPr.png</a></p>
<p>What I don't understand is why V[0][2] outputs 12 when it should output V[0][1] + A[0][2], or 7+4.</p>
<p>Context:
At a garage sale one day, you stumble upon an old school video game. In this video game, your
character must take a journey along an n × n grid, collecting rewards along the way. Specifically,
there is an n × n matrix A with nonnegative entries, and your character collects a reward equal to
Aij if he visits the cell (i, j) of the grid. Your objective is to maximize the sum of rewards collected
by your character.
(a) [4 points]. The rules of level one of the game are as follows. Your character starts at the
top-left corner — i.e., cell (1, 1) — of the grid, and must travel to the the bottom-right corner —
i.e., cell (n, n) — in sequence of steps. At each step, your character is allowed to move either one
cell to the right or one cell down in the grid; stepping upwards, to the left, or diagonally is not
2
allowed. Show how to compute the optimal journey in O(n
2
) time.</p>
| <c++> | 2016-03-31 01:41:20 | LQ_CLOSE |
36,323,691 | Guys I want to create a matrix using pointers in c++ | I want to create a pointer to array of pointers... but following code isn't working..
int **p;
p=new int[row_size];
for(i=0;i<row_size;i++)
p[i]=new int[column_size];
| <c++> | 2016-03-31 03:38:21 | LQ_EDIT |
36,324,980 | Error invalid operands to binary | <p>I am a beginner and I am using dev c++ . I am trying to write a function to determine which quadrant it lies in. Its fairly simple, but I am getting an error [Error] invalid operands to binary << (have 'float' and 'int')</p>
<pre><code>#include <stdio.h>
int quadrant (float i, float j);
int main()
{
float a,b;
int c;
scanf ("%f,%f",&a,&b);
c=quadrant(a,b);
printf("the given point lies in %d quadrant",c);
return 0;
}
int quadrant (float i, float j)
{
if (i>>0 && j>>0)
return 1;
else if (i>>0 && j<<0)
return 4;
else if (i<<0 && j>>0)
return 2;
else if (i<<0 && j<<0)
return 3;
else
return 0;
}
</code></pre>
<p>Is it because float numbers cant be used with binary operands?
I replaced floats with int, all the floats. This time when I compile I get error ID: return 1 status.
What is wrong with my code?</p>
| <c> | 2016-03-31 05:36:59 | LQ_CLOSE |
36,325,751 | INSERT DATA FROM ONE DATABASE TABLE TO ANOTHER DATABSE TABLE IN SAME SERVER | I wrote This query useing MYSQL work bench for insert data into one database to another Datbase,But it doesn't work,can you help me to solve this problem
USE att2000;
create trigger trgAfterInsert
after insert on CHECKINOUT for each row
INSERT INTO orangehrm_mysql.ohrm_attendance_record(employee_id,punch_in_utc_time) values(USERID,CHECKTIME);
SELECT
checkinout.USERID, checkinout.CHECKTIME
FROM
CHECKINOUT
WHERE
HOUR(CHECKTIME) < 12;
INSERT INTO orangehrm_mysql.ohrm_attendance_record(employee_id,punch_out_user_time) values(USERID,CHECKTIME);
SELECT
checkinout.USERID, checkinout.CHECKTIME
FROM
CHECKINOUT
WHERE
HOUR(CHECKTIME) >= 12; | <mysql><mysql-workbench> | 2016-03-31 06:30:50 | LQ_EDIT |
36,326,788 | Insert into multiple Tables in single Insert query in mysql | I have to insert in to 5 tables with multiple fields with single insert statement of mysql and how to do it in JDBC.
Iam unable to write in single statement, please provide me the syntax for inserting into multiple tables.
| <java><mysql> | 2016-03-31 07:25:53 | LQ_EDIT |
36,328,112 | How to run two webapplication in a single domain? Is that possible? | <p>I have a php application configured in apache server that serves api in www.example.com/api1, now i want to run my django app in the same domain but with different route like www.example.com/api2. Is that possible? please give your valuable solutions and suggestions.</p>
| <php><django><apache> | 2016-03-31 08:32:16 | LQ_CLOSE |
36,328,554 | How to decompress string in haffman coding | I compressed the "abc" word into "01100111" using haffman coding algorithm . I built the tree . According to tree a=01, b=100 , c=111 . how to decompress this word ? | <algorithm><compression><huffman-code> | 2016-03-31 08:52:32 | LQ_EDIT |
36,328,845 | Why is only one table row updated? (MySQL & PHP) | I'm trying to update the `rank` column in the `users` table in MySQL using PHP, but when i try to change the values and press the `update` button, **only the last one** of the table rows is actually being updated. [Here][1] is an image of what the PHP table looks like on the webpage. Here is the code:
<html>
<head>
</head>
<body>
<?php
include '../db/connect.php';
$con = $MySQLi_CON;
if (!$con){
die("Can not connect: " . mysql_error());
}
if(isset($_POST['update'])){
$UpdateQuery = "UPDATE users SET rank='$_POST[rank]' WHERE user_id='$_POST[hidden]'";
$con->query($UpdateQuery);
}
//$sql = "SELECT * from users";
//$myData = mysql_query($sql, $con);
$result = $MySQLi_CON->query("SELECT * FROM users")
or die(mysql_error());
echo "<table border=1>
<tr>
<th>ID</th>
<th>Username</th>
<th>Email</th>
<th>Rank</th>
</tr>";
while($record = $result->fetch_array()){
echo "<form action='test3.php' method='post'";
echo '<tr>';
echo '<td>' . $record['user_id'] . '</td>';
echo '<td>' . $record['username'] . '</td>';
echo '<td>' . $record['email'] . '</td>';
echo '<td>' . '<input type="number" name="rank" min="0" max="100" value="' . $record['rank'] . '"></td>';
echo '<td>' . '<input type="hidden" name="hidden" value="' . $record['user_id'] . '"</td>';
echo '<td>' . '<input type="submit" name="update" value="update"' . '</td></tr>';
}
echo "</table>";
$con->close();
[1]: http://i.stack.imgur.com/T9ESy.png | <php><mysqli><html-table> | 2016-03-31 09:04:24 | LQ_EDIT |
36,329,410 | After we split a String via regex, how could us get the length of new String? | public class TestString {
public static void main(String[] args) {
String str = "AaaaABBBBcc&^%adfsfdCCOOkk99876 _haHA";
String[] upStr = str.split("[a-z0-9&^% _]");
System.out.println("Printout uppercase");
for (String outUp : upStr){
System.out.print(outUp);
}
System.out.println("\n" + upStr.length);
//the "length" is wrong, so, where is the value comes from?
//How could we get real length?
System.out.println("\n Printout lowercase");
String[] lowStr = str.split("[A-Z0-9&^% _]");
for (String outLow : lowStr){
System.out.print(outLow);
}
System.out.println("\n" + lowStr.length);
System.out.println("\n non-English");
String[] nonEng = str.split("[A-Za-z]");
for (String outNonEng : nonEng){
System.out.print(outNonEng);
}
System.out.println("\n" + nonEng.length);
}
}
so my question is:
1. The value of the length is incorrect, but where is is comes from?
2. How could I get correct length of String[]? | <regex><string><split> | 2016-03-31 09:29:16 | LQ_EDIT |
36,331,429 | encode a string to a lenght of {n < 150} signs and decode it later? | <p>I would like to encode a string to another string with a lenght of < or = 150
I know that sha-1 can do that but here is the point:
I want to decode it later (without a supercomputer!)</p>
<p>I am searching for an algorithm. My favourite languages are: java and python but when i know the algorithm i could implement it...</p>
| <java><python><algorithm><encryption> | 2016-03-31 10:57:11 | LQ_CLOSE |
36,332,087 | minimum no of swap of operator to compliment expression tree evaluation | we have a expression tree where leaf node contain 0 or 1 as value, and all the internal nodes contain "&" or "||" as operator.now we evaluate the tree the result will be either 0 or 1.
The question is minimum no of swap of internal node required to compliment the result of original expression tree.
we can flip any internal node e.g:if it is a "&" we can make it "||" and vice versa.
To solve this I tried the following technique but I didn't succeeded in it:
my approach was that I would check the root whether it is a "&" or "||" operator and what was the result of evaluation tree 0 or 1.depending on that we go forward. | <algorithm><tree> | 2016-03-31 11:27:06 | LQ_EDIT |
36,332,624 | how to sort the table view from A-z | i am getting some data from one url and try to display in my table view,In that i have three button name which is used to sort.Here is my `button action ` method:
@IBAction func sortByAZBtnPress(sender: AnyObject)
{
}
@IBAction func sortByRatingBtnPress(sender: AnyObject)
{
}
@IBAction func sortByRecentBtnPress(sender: AnyObject)
{
}
And here is my `bussinesstype.swift` model class
import UIKit
class BusinessData {
var BusinessName: String?
var Address: String?
var Rating: Float?
var ContactNumber: String?
init(json: NSDictionary) {
self.BusinessName = json["business_name"] as? String
self.Address = json["location"] as? String
self.Rating = json["__v"] as? Float
self.ContactNumber = json["phone_no"] as? String
}
}
Here is my `viewcontroller.swift`
import UIKit
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
var isTapped:Bool? // cell tap checking bool
var selectedIndex:NSIndexPath?
@IBOutlet weak var RightMenu: UIView!
@IBOutlet weak var tableView: UITableView! // UITable view declaration
var arrDict = [BusinessData]() // array to store the value from json
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.jsonParsingFromURL() // call the json method
// nib for custom cell (table view)
let nib = UINib(nibName:"customCell", bundle: nil)
tableView.registerNib(nib, forCellReuseIdentifier: "cell")
indicator = UIActivityIndicatorView(frame: CGRectMake(0, 0, 90, 90))
indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray
indicator.center = self.view.center
indicator.color = UIColor .redColor()
self.view.addSubview(indicator)
}
override func viewWillAppear(animated: Bool) {
NSNotificationCenter.defaultCenter().addObserver(self, selector: "searchMethod:", name: "search", object: nil);
NSNotificationCenter.defaultCenter().addObserver(self, selector: "endSearch", name: "endSearch", object: nil);
}
// web services method
func jsonParsingFromURL ()
{
let url:NSURL = NSURL(string: "http://sample url/Fes?current_location=toronto&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyIkX18")!
if let JSONData = NSData(contentsOfURL: url)
{
if let json = (try? NSJSONSerialization.JSONObjectWithData(JSONData, options: [])) as? NSDictionary
{
if let reposArray = json["data"] as? [NSDictionary]
{
for item in reposArray
{
let itemObj = item as? Dictionary<String,AnyObject>
let b_type = itemObj!["business_type"]?.valueForKey("type")
if (b_type as? String == "Taxis")
{
arrDict.append(BusinessData(json: item))
}
}
}
}
}
}
// number of rows
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
return 1
}
// height for each cell
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat
{
return cellSpacingHeight
}
// calling each cell based on tap and users ( premium / non premium )
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell:customCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as! customCell
cell.vendorName.text = arrDict[indexPath.section].BusinessName
cell.vendorAddress.text = arrDict[indexPath.section].Address
cell.VendorRating.rating = arrDict[indexPath.section].Rating!
return cell
}
// MARK:
// MARK: Sort Method
@IBAction func sortByRevBtnPress(sender: AnyObject)
{
self.indicator.startAnimating()
self.indicator.hidden = false
RightMenu.hidden = true
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (Int64)(1 * NSEC_PER_SEC)), dispatch_get_main_queue()){
self.indicator.stopAnimating()
self.indicator.hidden = true
};
self.tableView.reloadData()
}
@IBAction func sortByAZBtnPress(sender: AnyObject)
{
RightMenu.hidden = true
}
@IBAction func sortByRatingBtnPress(sender: AnyObject)
{
RightMenu.hidden = true
}
@IBAction func sortByRecentBtnPress(sender: AnyObject)
{
RightMenu.hidden = true
}
}
please help me out, how can i sort the value in my table view `business_name` | <ios><swift><uitableview><sorting> | 2016-03-31 11:49:42 | LQ_EDIT |
36,332,793 | How to combine forms from two different solutions together C# | <p>I'm new to C# and wrote two different applications using Visual Studio 2015, each with a single Form. I didn't know how to have multiple forms together in one project (should've begun that way, to my everlasting regret), but now I need that to happen. I already found instructions on how to switch between forms in a project, so could someone please help me putting them together first in one application?</p>
| <c#><winforms><visual-studio-2015> | 2016-03-31 11:56:39 | LQ_CLOSE |
36,333,160 | How to extract date in dd-mmm-yyyy from string using regular expression | I am not good at creating regular expression.can any one help me with that.I need to extract Date Time from Following string. This Date time format remain constant and not going change.Can any one help me with that
Composed by super, mtzshm to super, mtzshm on 31-Mar-2016 02:24 with Normal priority and Message Type General Message
Composed by super, mtzshm to (Group)My Favorites on 31-Mar-2016 02:24 with Normal priority and Message Type General Message
Attached by super, mtzshm on 31-Mar-2016 02:24
Patient: MTzPatient, 89107
Chart: 31-Mar-2016 02:23
Visit: 31-Mar-2016 17:22
Displayed by super, mtzshm on 31-Mar-2016 02:24
Displayed by super, mtzshm on 31-Mar-2016 03:14 | <c#><regex> | 2016-03-31 12:13:19 | LQ_EDIT |
36,333,418 | Estimote SDK vs Altbeacon Library for Android Development | <p>What are the pros and cons of using the Estimote SDK or the Altbeacon beacon library for developing Android apps using BLE beacons?</p>
<p>I am only talking about the Estimte SDK not their cloud services.
I don't necessarily want to use Estimote beacons but as far as I understand the SDK works with any iBeacon or Eddystone beacons (without the cloud services).</p>
| <android><ibeacon><altbeacon><estimote><eddystone> | 2016-03-31 12:23:46 | LQ_CLOSE |
36,335,537 | save result in new table sql | How can I save the data into a new table?
<!-- begin snippet: js hide: false -->
<!-- language: lang-js -->
SELECT
produse.DENUMIRE,
clase.CLASA,
furnizori.NUME_J,
furnizori.NUME_F,
stoc.CANTITATE,
produse.PRET,
produse.VALUTA,
stare.STARE
FROM clase
JOIN produse ON produse.ID_CLASA = clase.ID
JOIN furnizori ON produse.ID_FURNIZOR = furnizori.ID
JOIN stoc ON stoc.ID_PRODUS = produse.ID
JOIN stare ON stare.ID = stoc.ID_STARE;
<!-- end snippet -->
Thank you very much! | <sql> | 2016-03-31 13:56:33 | LQ_EDIT |
36,336,772 | HTML5/Bootstrap - How do i add tooltip for bootstrap glyphicon icons? | <p>How do i add the tooltip for the below HTML5 statement?</p>
<pre><code><tr><td><a ng-href="#">Call us</a>
<span class="glyphicon glyphicon-phone" > </span>
</td>
</code></pre>
| <javascript><css><html><twitter-bootstrap> | 2016-03-31 14:48:06 | LQ_CLOSE |
36,336,925 | Don't get my ToSting to work. name with right score | I dont get way my ToString dosent work? I want it to get the right name white right score.
namespace _501
{
class Program
{
static void Main(string[] args)
{
Console.Title = "###### Nicklas Dart Räknare ######";
Game game = new Game();
game.PlayGame();
}
}
//***************************************************************************
class Game
{
private List<Player> player = new List<Player>();
public void AddPlayer(string name)
{
Player person = new Player(name);
player.Add(person);
}
public void PlayGame()
{
int totalaSumma = 0;
Console.Write("Hur många spelare? ");
int antalSpelare = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < antalSpelare; i++)
{
Console.Write("Skriv in spelarens namn: ");
string spelaresNamn = Console.ReadLine();
AddPlayer(spelaresNamn);
}
do
{
foreach (Player name in player)
{
int summa = 0;
if (totalaSumma > 500)
{
Endgame();
break;
}
Console.WriteLine(name + " tur att kasta");
Console.WriteLine("Först poängen");
int score1 = Int32.Parse(Console.ReadLine());
totalaSumma = totalaSumma + score1;
if (totalaSumma > 500)
{
Endgame();
break;
}
Console.WriteLine("Andra poängen");
int score2 = Int32.Parse(Console.ReadLine());
totalaSumma = totalaSumma + score2;
if (totalaSumma > 500)
{
Endgame();
break;
}
Console.WriteLine("Tredje poängen");
int score3 = Int32.Parse(Console.ReadLine());
summa = score1 + score2 + score3;
totalaSumma = score3 + totalaSumma;
Console.WriteLine("totala summan av all tre kast blev: " + summa);
Console.WriteLine(name + " totala summan är: " + totalaSumma);
}
} while (totalaSumma < 501);
}
public void Endgame()
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Grattis " + player.ToString() + " Du vann");
for (int i = 0; i < 10; i++)
{
int sec= 300;
Console.BackgroundColor = ConsoleColor.Red;
System.Threading.Thread.Sleep(sec);
Console.BackgroundColor = ConsoleColor.Yellow;
System.Threading.Thread.Sleep(sec);
Console.BackgroundColor = ConsoleColor.Green;
System.Threading.Thread.Sleep(sec);
Console.BackgroundColor = ConsoleColor.White;
System.Threading.Thread.Sleep(sec);
}
System.Threading.Thread.Sleep(300);
}
}
//***************************************************************************
class Player
{
public string Name { get; set; }
public List<Arrows> trow = new List<Arrows>();
public Player(string name = "")
{
Name = name;
}
public override string ToString()
{
return Name;
}
}
//***************************************************************************
class Arrows:Player
{
private int arrowOne;
private int arrowTwo;
private int arrowThree;
public Arrows(int arrowOne = 0, int arrowTwo = 0, int arrowThree = 0)
{
this.arrowOne = arrowOne;
this.arrowTwo = arrowTwo;
this.arrowThree = arrowThree;
}
public int GetScore()
{
return arrowOne + arrowTwo + arrowThree;
}
public override string ToString()
{
return string.Format("Din totala summa är {0}{1}", Name );
}
}
}
/*public int SlumpDator(string ord)
{
Random random = new Random();
int slumptal = random.Next(0 - 60);
System.Threading.Thread.Sleep(100);
}*/
/* if (name == "Dator")
{
Random random = new Random();
int slumptal = random.Next(0 - 60);
System.Threading.Thread.Sleep(100);
}*/ | <c#><tostring> | 2016-03-31 14:54:20 | LQ_EDIT |
36,337,033 | Solving the double precision issue for string representations of 0d and -.1d | I have a numeric up/down control, essentially a normal textbox with up down buttons next to it that stores its value as a double. I have been running into an issue when cycling up and down, when the value is (or should be) 0 or -.1, the text box displays "1.38777878078145E-16" and "-0.0999999999999999" respectively.
I get that the floating point precision of double means that values get truncated and absolute precision for decimals longer than the doubles precision are lost. But seeing as how .1 does not have a long decimal or need high precision, shouldn't .1 - .1 = 0?
Right now I am just catching the string in my double to string converter and handling it, but is there a better way to do this?
No I cannot use decimal due to its overhead.
[ValueConversion(typeof(Double), typeof(String))]
public class DoubleToStringValueConverter : IValueConverter
{
public object Convert(object value,
Type targetType,
object parameter,
System.Globalization.CultureInfo culture)
{
string res = ((double)value).ToString(culture);
if (res == "1.38777878078145E-16") res = "0";
if (res == "-0.0999999999999999") res = "-1";
return res;
}
public object ConvertBack(object value,
Type targetType,
object parameter,
System.Globalization.CultureInfo culture)
{
string val = value as string;
double res = 0d;
double.TryParse(val, System.Globalization.NumberStyles.Float, culture, out res);
return res;
}
} | <c#><double> | 2016-03-31 14:58:42 | LQ_EDIT |
36,337,482 | CSS Advanced Positioning; Need Help Please | I am creating a website and am working on a hover animation for css.
<html>
...
<body>
<div id ="outer_container">
<div id="inner_container">
<img id="imageOne"/>
</div>
</div>
...
</body>
<html>
** outer_container takes up the width of the page **
inner_container is a child of outer_container and is aligned in the center of it vertically.
The css animation displays a hidden element named 'blur' which is basically a background color block that takes up the width and height of the image. On hover "blur" appears on top of the <img/> tag inside of the inner_container div.
Unfortunately the block element "blur" is placed over the top of the the image tag using "position : relative / position : absolute" causing it to interfere with the display : inline-block used to align the inner_container div with the outer_container div.
I'm looking for a solution that would allow the hidden element to be displayed on top of the <img/> tag in the inner_container div without using position : relative / position : absolute so that I can still align the inner_container div inside of the outer_container div.
The actual page code can be found here :
http://jsbin.com/zawiqarijo/1/edit?html,css,output
Thank you for your help ahead of time!
| <css><positioning><display><onhover> | 2016-03-31 15:19:20 | LQ_EDIT |
36,337,938 | Javascript for loop with if statement not reaching the else if statement | <p>why wont this reach the else if and return (i + 0) / 2? Also, why wont the alert give me i + 0 for a 2 digit value? (ie: 10, 20, 30, 40, etc. Any help would be appreciated.</p>
<pre><code>var key= "OSN0MSA9991UNAAM8ELDPBD9F57BD6PU6BVBN54CDLEGDSUSNS";
var x = 0;
if (key[20] != "P" || key[18] != "P") {
x = 0;
for (i=0;i<10;i++) {
if (key[26] == i) {
x = i + 0;
alert(x);
}
};
} else if (key[20] == "P") {
for (i=9;i>-1;i--) {
if (key[26] == i) {
x = (i + 0) / 2;
alert(x);
}
};
};
</code></pre>
| <javascript><if-statement><for-loop> | 2016-03-31 15:42:23 | LQ_CLOSE |
36,338,927 | How to zero specific column of 2d array | <p>Lets say I have a specific 2d array of 100x100 like so</p>
<p>I'm implementing an adjacency matrix and thus I want to be able to zero a specific column and line (the same column and line in this case), zeroing lines is pretty straightforward but I'm not really able to understand how I would go about for columns.</p>
<p>For example to zero the 2nd element of the adjacency matrix:</p>
<p><a href="https://i.stack.imgur.com/XV2D5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XV2D5.png" alt="enter image description here"></a></p>
| <c><arrays><multidimensional-array><adjacency-matrix> | 2016-03-31 16:30:04 | LQ_CLOSE |
36,340,926 | What is the best platform/solution to develop an app for iOS, Android, and Blackberry? | <p>I will be making a database that is offline and online and wondered what I could use to develop apps for Apple's iOS, Android, and Blackberry all in one sweep. I know Xamarin does iOS and Android, but not too sure how well it will be on Blackberry? Are there any other solutions or ideas to nudge me in the right direction. Thank you.</p>
| <android><ios><blackberry> | 2016-03-31 18:24:22 | LQ_CLOSE |
36,342,212 | LINQ search inside a collection based on a given list of items | Lets say I am given a list<string> as input:
IList<string> availableFruits = {orange, banana}
I have a fruit entity that looks like this:
public Fruit
{
public int ID { get; set; }
public string name { get; set; }
}
we define some fruits:
var f1 = new Fruit { Id = 1, name = "apple" };
var f2 = new Fruit { Id = 2, name = "banana" };
var f3 = new Fruit { Id = 3, name = "orange" };
var f4 = new Fruit { Id = 4, name = "pineapple" };
Finally, we have a menu where these fruits go:
public class Menu
{
public int ID { get; set; }
public ICollection<Fruit> fruits;
}
var menus = new List<Menu>
{
new Menu {ID = 0, fruits = new List<Fruit> { f1, f2 } },
new Menu {ID = 1, fruits = new List<Fruit> { f1, f3, f4 } },
new Menu {ID = 2, fruits = new List<Fruit> { f1, f4 } },
new Menu {ID = 3, fruits = new List<Fruit> { f2 } },
};
I need a LINQ query that searches in the menus and returns all menus that contains 'ANY' of the fruits passed in the avaiableFruits list. Thus in this case it will return menus with ID's 0, 1 and 3.
Thanks in advance for you help.
Fike | <c#><linq><search> | 2016-03-31 19:36:49 | LQ_EDIT |
36,343,284 | Can I Make Real Useful Desktop Program Using Visual Studio? | <p>I've Learned C# Using Visual Studio For Long Enough. It's So Fun and Easy To Code and Learn Programming Using Visual Studio IDE. But Sometimes, I Ever Think To Make A Real Program That Useful Like Usually Software. Could I Make Good Software Just Using Visual Studio ? and If Yes, What's The Shortage of A Software That Develop Using Visual Studio ?</p>
<p>Thanks,</p>
| <visual-studio><software-distribution> | 2016-03-31 20:36:33 | LQ_CLOSE |
36,343,623 | Content Margin Depend on Other Div | I have created 2 div next to each other(Left and Right)the height depend on each other I just use display: table-cell for it.
But on the left div if any item has margin it is affect right div content, content going down while I increase the margin how to solve it ?
Thank you. | <html><css> | 2016-03-31 20:56:36 | LQ_EDIT |
36,344,035 | Border bottom animation | <p>How can I make the bottom border animations like <a href="http://htmlcoder.me/preview/the_project/v.1.1/template/index-construction.html" rel="nofollow">here</a> ? In main header.</p>
| <jquery><css><animation> | 2016-03-31 21:21:03 | LQ_CLOSE |
36,344,055 | Cannot set label's content to zero | <p>I've got the following coding where I am trying to step through a couple of <code>if</code> statements, but I've got a problem with setting my label's content to <code>0</code>;</p>
<pre><code>private void UnderRunBumper()
{
lblGVMAmount.Content = 0; //Issue here
if (Convert.ToInt32(txtExternalLength.Text) >= 6000)
lblUnderRunBumper.Content = "Under-Run Bumper";
else if (Convert.ToInt32(lblGVMAmount.Content.ToString()) >= 8000)
lblUnderRunBumper.Content = "Under-Run Bumper";
else if (cmbBodyType.SelectedIndex == 6 || cmbBodyType.SelectedIndex == 7 || cmbBodyType.SelectedIndex == 8 || cmbBodyType.SelectedIndex == 9 || cmbBodyType.SelectedIndex == 10)
lblUnderRunBumper.Content = "Under-Run Bumper";
else lblUnderRunBumper.Content = "";
}
</code></pre>
<p>I get the error:</p>
<blockquote>
<p>Object reference not set to an instance of an object.</p>
</blockquote>
<p>I don't understand. Why can't I set my label's value to 0?</p>
| <c#><wpf><label> | 2016-03-31 21:22:24 | LQ_CLOSE |
36,344,110 | C code to find "Cullen's number" | <p>Need to make a C code that asks of the user to input one number, and the code will check whether the number is a "Cullen's number" or not.</p>
<p>A number is Cullen's number as long as you can calculate it by doing "2^n * n + 1".</p>
<p>Examples of Cullen's numbers:</p>
<pre><code>3=2^1 * 1 + 1
9=2^2 * 2 + 1
25=2^3 * 3 + 1
</code></pre>
<p>Here's the code I was working on, any help?</p>
<pre><code>#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
int num, brojP, potency = 0, numRepeats = 0, endResult=0, isCullen;
printf("Unesite broj");
scanf("%d", &num);
do
{
potency = potency + 1; // initializing "potency" and at the same time making it one number larger at each repeat of the loop
do
{
brojP = 2*potency;
numRepeats = numRepeats + 1;
} while (numRepeats < potency); // this entire loop is used for "2^n" part
endResult = brojP * potency + 1; // calculate the "2^n * n + 1"
numRepeats = 0;
if (endResult == num)
{
isCullen = 1;
break;
}
} while (endResult < num);
if (isCullen == 1)
printf("Number inputted is Cullen's number\n");
else
printf("Number inputted isn't Cullen't number\n");
return 0;
}
</code></pre>
| <c> | 2016-03-31 21:25:52 | LQ_CLOSE |
36,346,193 | Ignoring Certain String Characters | Let's say I write some code to print out "Hello World."
Could I use some sort of character to ignore the r in hello world so that the output is "Hello Wold?"
I have a value that I am using. I have the following characters:
&, \, and *.
I think one of these characters is causing me to have some of my values ignored.
Normally I would just test this myself, but I am not able to do this at this time.
| <java> | 2016-04-01 00:43:07 | LQ_EDIT |
36,347,262 | how 'while (*dst++ = *src++) ;' be executed? | <p>I read this in a strcpy funciton. </p>
<pre><code>while (*dst++ = *src++)
;
</code></pre>
<p>I'm not really sure the execute order. who can help me?</p>
| <c> | 2016-04-01 02:58:44 | LQ_CLOSE |
36,348,684 | How to change Browser button name? | <p>As I am new in UI development ,Kindly help to provide solution. How to change the Browser button name by using jquery.</p>
| <javascript><jquery><html> | 2016-04-01 05:25:02 | LQ_CLOSE |
36,349,064 | Closures inside loops and local variables | <p>I am a JS novice and I was reading about closures, the common issues that arise due to misunderstanding how closures work and the "setting handlers inside a loop" was a pretty good example. I've also seen and understood the ways to get around this, i.e, by calling another function passing the loop variables as arguments and returning a function. Then I tried to take a dip to see if there are any other ways to get around this and I created the following code.</p>
<pre><code>var i;
var inpArr = new Array();
for(i = 0; i < 10; ++i) {
inpArr.push(document.createElement("input"));
inpArr[i].setAttribute("value", i);
inpArr[i].onclick = function() {
var index = i;
alert("You clicked " + index);
}
document.body.appendChild(inpArr[i]);
}
</code></pre>
<p>It doesn't work which I guessed but I don't understand why. I understand <code>i</code> was captured and made available to all the function expressions generated. But why does this still not work after assigning the captured variable to the local variable <code>index</code>? Isn't assigning <code>i</code> the same as passing <code>i</code> as an argument to another function? I mean, isn't <code>i</code> a primitive and isn't it supposed to be copied?</p>
<p>I am confused and I would really appreciate it if someone could tell me what's going on here.</p>
| <javascript><closures> | 2016-04-01 05:58:14 | LQ_CLOSE |
36,349,693 | how to check if the javascript contains atleast 2 alphabets | i need to check if test contains atleast 2 alphabets like SC then do something.
var test='SC129h';
if(test.containsalphabets atleast 2){
alert('success');
}
else{
alert('condition not satisfied for alphabets');
}
please let me know how to check the if condition for any alphabets with length 2 | <javascript> | 2016-04-01 06:43:45 | LQ_EDIT |
36,350,464 | What are key points to determine SQL Server version cost? | <p>I have to design website to start migration of sql server from one version to another and based on client database requirements we will tell him the cost of this migration and which sql server version is best to use?</p>
| <sql-server> | 2016-04-01 07:29:33 | LQ_CLOSE |
36,351,091 | how to list all databases names sql server in asp.net mvc 5 | i'm trying this code in controller but doesn't work ...
Server myserver = new Server(".");
DataTable servers = SqlDataSourceEnumerator.Instance.GetDataSources();
DatabaseCollection mydata = myserver.Databases;
foreach (Database db in myserver.Databases)
{
} | <c#><asp.net><sql-server><asp.net-mvc> | 2016-04-01 08:02:31 | LQ_EDIT |
36,351,544 | How the comapre() method without calling in main method? | enter code here
import java.util.*;
class MyComp implements Comparator<String>{<br/>
public int compare(String aStr, String bStr) {<br/>
return bStr.compareTo(aStr);<br/>
}
}<br/>
public class CustomComparatorTest {
public static void main(String[] args) {
MyComp my = new MyComp();
TreeSet<String> ts = new TreeSet<String>(my);
ts.add("C");
ts.add("A");
ts.add("B");
ts.add("Y");
ts.add("T");
ts.add("W");
for(String element : ts)
{
System.out.println(element + " ");
}
System.out.println();
}
}
| <java><collections> | 2016-04-01 08:27:45 | LQ_EDIT |
36,352,528 | android - ListView.setAdapter error: java.lang.NullPointerException | <p>I am getting error "java.lang.NullPointerException" by setting my adapter in ListFragment activity.</p>
<p>Here is my code:</p>
<pre><code>private List<Music> musicList;
public View inflate;
ListView searchList;
public class SearchFragment extends ListFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
context = getActivity().getApplicationContext();
inflate = inflater.inflate(R.layout.search, container, false);
musicList = new ArrayList<Music>();
adapter = new CustomListAdapter(musicList, context);
searchList.setAdapter(adapter);
}
</code></pre>
<p>I have a NullPointerException in the following code:</p>
<p>The error is at <code>searchList.setAdapter(adapter);</code> so i also try to change to adapter value from <code>new ArrayList<Music>()</code> to <code>new <Music>ArrayList()</code> but no luck.</p>
<p>My Music class looks like this:</p>
<pre><code>public class Music {
private String title, thumbnail, duration, uri, waveform;
private int likes, playbackCount;
public Music() {
}
public Music(String name, String thumbnailUrl, int likes, String rating, int playbackCount) {
this.title = name;
this.thumbnail = thumbnail;
this.likes = likes;
this.duration = rating;
this.playbackCount = playbackCount;
}
public String getTitle() {
return title;
}
public void setTitle(String name) {
this.title = name;
}
public String getThumbnail() {
return thumbnail;
}
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail;
}
public int getLikes() {
return likes;
}
public void setLikes(int likes) { this.likes = likes; }
public String getDuration() {
return duration;
}
public void setDuration(String duration) {
this.duration = duration;
}
public int getPlayBackCount() {
return playbackCount;
}
public void setPlayBackCount(int playbackCount) {
this.playbackCount = playbackCount;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String getWaveform() {
return waveform;
}
public void setWaveform(String waveform) {
this.waveform = waveform;
}
}
</code></pre>
| <java><android><listview><nullpointerexception> | 2016-04-01 09:20:46 | LQ_CLOSE |
36,352,666 | How to create a categorical variable in R with unequal categoris | <p>I am trying to create categories of credit bureau scores. I have indiviudal scores for clients but I would like to create categories as follows: -1, 0, 1 - 50, 51 - 150, 151 - 250, 251+ I use R</p>
| <r> | 2016-04-01 09:27:34 | LQ_CLOSE |
36,353,298 | c#: if It can be shortened | It can be shortened the following command
if (ürün_kısakod.Text != "")
{
komut.Parameters.Add("@kısakod", SqlDbType.SmallInt, 5).Value = Int16.Parse(ürün_kısakod.Text);
}
else
{
komut.Parameters.Add("@kısakod", SqlDbType.SmallInt, 5).Value = DBNull.Value;
} | <c#> | 2016-04-01 09:56:37 | LQ_EDIT |
36,355,544 | Powershell Calculate number of lines using xml attributes values | I have one xml file say like below,
<data>
<fields>
<artifacts>
<artifact AL="68" CL="4" DL="0">
</artifact>
<artifact AL="86" CL="2" DL="1">
</artifact>
<artifact AL="34" CL="7" DL="0">
</artifact>
<artifact AL="18" CL="1" DL="3">
</artifact>
</artifacts>
<dart>
<bug>
<fields part="Major">Yes</fields>
<fields part="Major">Yes</fields>
<fields part="Major">No</fields>
</bug>
</dart>
</fields>
</data>
i want powershell read xml files and gives total lines (TL = AL + DL + CL) calculating each xml atrifact tags and list defects only it is Major equals Yes
Thanks,
sundarm | <xml><powershell><powershell-3.0> | 2016-04-01 11:46:28 | LQ_EDIT |
36,355,927 | Setter doesnt work | <p>Iam trying to make login activity
I got a problem. My setter doesnt work, i dont know why?
I have 3 classes.</p>
<p>1st one is Data with server data and getters and setters</p>
<pre><code>public class Data{
String addressesURL = "/DataSnap/rest/TServerMethods1/LookupCustomers";
String articlesURL = "/DataSnap/rest/TServerMethods1/LookupArticle";
String invoicesURL = "/DataSnap/rest/TServerMethods1/LookupInvoice";
String invoicesDetailsURL = "/DataSnap/rest/TServerMethods1/LookupInvoicePos";
String invoicesDetailsAddressesURL = "/DataSnap/rest/TServerMethods1/LookupInvoiceAddress";
String ordersURL = "/DataSnap/rest/TServerMethods1/LookupOrders";
String ordersDetailsURL = "/DataSnap/rest/TServerMethods1/LookupOrdersPos";
String ordersDetailsAddressesURL = "/DataSnap/rest/TServerMethods1/LookupOrdersAddress";
public String serverURL;
//String serverURL = "http://10.10.10.75:8081";
String username = "admin";
String password = "admin";
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getAddressesURL() {
return addressesURL;
}
public void setAddressesURL(String addressesURL) {
this.addressesURL = addressesURL;
}
public String getArticlesURL() {
return articlesURL;
}
public void setArticlesURL(String articlesURL) {
this.articlesURL = articlesURL;
}
public String getInvoicesURL() {
return invoicesURL;
}
public void setInvoicesURL(String invoicesURL) {
this.invoicesURL = invoicesURL;
}
public String getInvoicesDetailsURL() {
return invoicesDetailsURL;
}
public void setInvoicesDetailsURL(String invoicesDetailsURL) {
this.invoicesDetailsURL = invoicesDetailsURL;
}
public String getInvoicesDetailsAddressesURL() {
return invoicesDetailsAddressesURL;
}
public void setInvoicesDetailsAddressesURL(String invoicesDetailsAddressesURL) {
this.invoicesDetailsAddressesURL = invoicesDetailsAddressesURL;
}
public String getOrdersURL() {
return ordersURL;
}
public void setOrdersURL(String ordersURL) {
this.ordersURL = ordersURL;
}
public String getOrdersDetailsURL() {
return ordersDetailsURL;
}
public void setOrdersDetailsURL(String ordersDetailsURL) {
this.ordersDetailsURL = ordersDetailsURL;
}
public String getOrdersDetailsAddressesURL() {
return ordersDetailsAddressesURL;
}
public void setOrdersDetailsAddressesURL(String ordersDetailsAddressesURL) {
this.ordersDetailsAddressesURL = ordersDetailsAddressesURL;
}
public String getServerURL() {
return serverURL;
}
public void setServerURL(String serverURL) {
this.serverURL = serverURL;
}}
</code></pre>
<p>2nd one is where I start my login Activity</p>
<pre><code>public class Settings extends AppCompatActivity {
//declarations
//Edittext fields for username , server, password & port information
EditText edtIpurl, edtPort, edtUsername, edtPassword;
//Textviews that can be clicked
TextView databaseDel, databaseRef, magnumgmbh, contact, support;
//imagebuttons for bottom menu
ImageButton contacts, articles, invoices, orders;
//string for server URL
//String sURL = "http://";
Thread newSettingsThread;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
setTitle("Settings");
newSettingsThread = new Thread(){
public void run(){
runOnUiThread(new Runnable() {
@Override
public void run() {
String serverURL = "http://rest.magnumgmbh.de";
//edtIpurl = (EditText)findViewById(R.id.edtIpurl);
Data newD = new Data();
newD.setServerURL(serverURL);
}
});
}
};
newSettingsThread.start();
//start activitys if bottom buttons clicked
contacts = (ImageButton) findViewById(R.id.contacts);
//articles activity start
contacts.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//start activity addresses
Intent startAddresses = new Intent(Settings.this, Addresses.class);
startActivity(startAddresses);
}
});
}}
</code></pre>
<p>And the next one is where i try to get my new serverURL</p>
<pre><code>public class Address extends AppCompatActivity{
Thread newAddressThread;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_addresses);
//set activity name
setTitle("Addresses");
//new thread for network operations
newAddressesThread = new Thread() {
public void run() {
//make text from json
jsonText = new StringBuilder();
try {
String str;
Data newData = new Data();
//json dates url
String addressesURL = newData.getAddressesURL();
String serverUrl = newData.getServerURL();
String username = newData.getUsername();
String password = newData.getPassword();
URL url = new URL(serverUrl + addressesURL);
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
//String encoded = Base64.encode("admin:admin");
String encoded = Base64.encodeToString((username+":"+password).getBytes("UTF-8"), Base64.NO_WRAP);
urlConnection.setRequestProperty("Authorization", "Basic " + encoded);
//check http status code
try {
int statusCode = urlConnection.getResponseCode();
System.out.println(statusCode);
} catch (IOException e) {
}
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
while ((str = in.readLine()) != null) {
jsonText.append(str);
}
//cast stringbuilder to string
addressesJsonStr = jsonText.toString();
//close IOstream
in.close();
} catch (MalformedURLException e1) {
System.out.println(e1.getMessage());
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
};
//start thread
newAddressesThread.start();
}}
</code></pre>
<p>Hier in the third one by serverURL I got null and it thow me an exeption "<code>Protocol not found: null/DataSnap/rest/TServerMethods1/LookupCustomers</code>" so that is my problem.
What do I wrong?</p>
| <java><android><login><setter> | 2016-04-01 12:06:25 | LQ_CLOSE |
36,357,134 | Limit results from database using ajax (by selecting a dropdown menu) | <p>So I got a simple dropdown menu with some values in it. What I want to happen is the following:</p>
<p>When a user selects a value in the dropdownlist, for example '8'. I want the query to change it's limit to 8. </p>
<p>And when a user selects '12' I want the limit to change to 12.</p>
<p>So change the amount of results loaded according to the value selected in the drop-down list.</p>
<p>I know I can achieve this with ajax, but I have no idea where to start. Does anyone know some good tutorials? Or does anyone have some code to get me started?</p>
<p>I'm familiar with PHP, just not with ajax.</p>
| <php><ajax> | 2016-04-01 13:03:41 | LQ_CLOSE |
36,357,332 | I have an observation and I need to make a column from it. SAS | I have an observation and I need to make a column from it.
I tried split, I tried transpose, but nothing...
<!-- begin snippet: js hide: true -->
<!-- language: lang-js -->
I have:
num first second third
1 13 17 16
2 23 11 64
I need:
num var_n
1 13
17
16
2 23
11
64
<!-- end snippet -->
Can you give me some advice, please | <sas> | 2016-04-01 13:13:45 | LQ_EDIT |
36,359,489 | Compare Lines on csv file | <p>I have this csv file which has an answer key in the top row and all of the students answers below it in a roll like so:</p>
<pre><code>First Name,Last Name,Student ID,Version,Score,1,2,3,4,5,6,7,8,9,10
Answer Key,,,p,75,j,c,g,c,g,d,f,a,j,c
Mark,Mueller,14697,p,35,j,c,f,c,d,f,a,j,c,j
Andruw ,Wittles,15674,p,75,a,c,d,f,h,g,a,d,j,d
Bob,Johnson,32423,p,36,d,a,j,i,d,a,b,c,j,d
John,Smith,12343,p,67,a,c,b,g,h,j,a,d,c,b
</code></pre>
<p>The problem is that I cant find a good way to compare the answer key and the students answers. If you could help me also give the student's id the score. (The 5 digit number after the name)</p>
<p>Thanks.</p>
| <c#><visual-studio><csv> | 2016-04-01 14:54:01 | LQ_CLOSE |
36,363,470 | What programming languages used to create terminal apps? | <p>What are the languages that used to build apps like:
ls, curl, nmap, htop
and other homebrew apps like: youtube-dl.</p>
<p>I'm wonder about; if I want to build an app to run it through terminal and published in homebrew, what language should I used?</p>
| <macos><terminal><homebrew> | 2016-04-01 18:32:37 | LQ_CLOSE |
36,364,281 | What are best resources to understand concurrency in golang? | <p>I am new to go? Can someone specify resources for understanding concurrency using go? </p>
| <go> | 2016-04-01 19:21:14 | LQ_CLOSE |
36,365,102 | How to import an Excel file to an HTML page | <p>first of all let me tell you that im sorry for my bad english.
i'm working on a project(HTML5,JS,CSS3) and i have to import excel file to a table of HTML.So if u can give me some help ill appreciate that .ty anyway </p>
| <javascript><html> | 2016-04-01 20:14:12 | LQ_CLOSE |
36,366,978 | How can I check if this file name is created or not in c# | <p>I'm trying to create a method that checks if this file ( todayfile.txt) is created if not I need it to create it. Here is what I thinking of :</p>
<pre><code>private void ReadWater()
{
try
{
StreamReader inputFile;
// I want to check if there is a file named ( Todayfile.txt )
if (// if this file ( Todayfile.txt) is founded)
{
// Do this
}
else // if there is no file in this nmae ( Todayfile.text )
{
// create a new file
}
}
catch (Exception ex)
{
}
}
</code></pre>
| <c#> | 2016-04-01 22:48:09 | LQ_CLOSE |
36,367,134 | Declaring a jagged array in C | I have a data in a following format:
{{{0}},{{1}},{{2,3}},{{1,2},{3,4}},{{5,6},{7,8},{9,10}},....
Is there any way of storing this in a jagged array? The data is large, and I would like to include it directly in the code. I searched internet and it says I can declare it in a following way:
{ new int[][] { new int[] {0} }, new int[][] { new int[] {1} }, new int[][] { new int[] {2,3} }, new int[][] {new int[] {1,2} ,new int[] {3,4} } , ...
but typing those new int[][] would be too time consuming and I am looking for a way that I can used the original data directly into the code.
Is there a way to do that?
Any suggestion would be appreciated! | <c#><jagged-arrays> | 2016-04-01 23:04:08 | LQ_EDIT |
36,367,210 | C++ boolalpha confusion | <p>Hi anyone can explain the following c++ code result?</p>
<pre><code>input: true false 1
output: false, true, true,
#include <iostream>
using namespace std;
int main ()
{
bool c1, c2, c3;
cin >> c1 >> c2 >> c3;
cout << boolalpha << c1 << ", " << c2 << ", " << c3 << ", " << endl;//LINE I
return 0;
}
</code></pre>
| <c++> | 2016-04-01 23:11:26 | LQ_CLOSE |
36,367,339 | C++ CLI Wrapper for native functions | I'm trying to create a C++ CLI .Net wrapper for some native DLLs.
There is seven of these DLLs and more in the future so i need to load the dynamically. They all have the same set of functions.
LoadLibrary and GetProcAddress worked great in a native application to load these functions.
Whenever i load a DLL, and call Initialize i get AccessViolationException.
Not really sure why.
It seems to Load the DLL fine and also the function "TSRInit"
If I pass in a path to the DLL i know is incorrect it tells me loading it failed. But doesnt say failed if I pass the correct path.
Likewise, Loading "TRInit" seems to work.
If i pass in a function name that doesnt exist it also tells me.
Im testing with a C# Console app with platform x86 selected.
typedef long (WINAPI *TSRINIT)(long lType, HWND hParent, RECT *pRect);
namespace Imagery
{
public ref class Recongizer
{
public:
Recongizer(String^ DllPath) { LoadRecongizer(DllPath); }
~Recongizer() { UnloadLibrary(); }
bool LoadRecongizer(String^ DllPath)
{
HInstance = ::LoadLibrary(msclr::interop::marshal_as<std::wstring>(DllPath).c_str());
if (HInstance == nullptr) return false;
if (!LoadFunctions()) return false;
return true;
}
long Initalize(long lType)
{
if (HInstance == nullptr) return 0;
return TSInit(0, nullptr, nullptr);
}
private:
void UnloadLibrary()
{
if (HInstance != nullptr) ::FreeLibrary(HInstance);
}
bool LoadFunctions()
{
TSInit = (TSRINIT)::GetProcAddress(HInstance, "TSRInit");
if (TSInit == nullptr)
{
ErrorMessage = "TSRInit could not be loaded.";
return false;
}
return true;
}
property String^ ErrorMessage;
private:
HINSTANCE HInstance{ nullptr };
TSRINIT TSInit{ nullptr };
};
}
| <.net><dll><c++-cli><interop><mixed-mode> | 2016-04-01 23:23:47 | LQ_EDIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.