date stringlengths 10 10 | nb_tokens int64 60 629k | text_size int64 234 1.02M | content stringlengths 234 1.02M |
|---|---|---|---|
2018/02/25 | 435 | 1,455 | <issue_start>username_0: How we can pass a column name and operator name dynamically to the SQL query with Spark in Scala?
I tried (unsuccessfully) the following:
```
spark.sql("set key_tbl=mytable")
spark.sql("select count(1) from ${key_tbl}").collect()
```<issue_comment>username_1: Quite more simply, you should be... |
2018/02/25 | 597 | 2,036 | <issue_start>username_0: I'm very new to Python and I was attempting to make a silly little pointless piece of code. However, when I try to run the code I get an "invalid syntax" error. This is the code:
```
import time
name=input("What would your name happen to be?")
print("Hello there,", name,"!")
time.sleep(3)
o... |
2018/02/25 | 1,523 | 4,060 | <issue_start>username_0: I'm trying to understand some haskell code.
This makes sense.
```
Prelude> fmap (+1) (Just 1)
Just 2
```
This also makes sense.
```
Prelude> (fmap.fmap) (+1) (Just [1])
Just [2]
```
But I don't understand how this works.
```
Prelude> (fmap.fmap) (+1) Just 1
Just 2
```
I've tried worki... |
2018/02/25 | 355 | 1,219 | <issue_start>username_0: I'm going over examples on Spark RDDs and found the following snippet as an example:
```
JavaRDD distFile = sc.textFile("data.txt");
distFile.map(s -> s.toString().length()).reduce((a, b) -> a + b);
```
However, this code gives an error (straight from Netbeans):
```
bad operand types for b... |
2018/02/25 | 447 | 1,418 | <issue_start>username_0: I am trying to find the key with max value but an error is generated everytime saying cannot convert text to string. This is related to java mapreduce.
>
> Error :
> The method write(Text, IntWritable) in the type TaskInputOutputContext is not applicable for the arguments (String, IntWritabl... |
2018/02/25 | 351 | 1,234 | <issue_start>username_0: ```
{
"status": "ok",
"totalResults": 80249,
"articles": [
{
"source": {
"id": null,
"name": "Newsbtc.com"
},
"author": "<NAME>",
"title": "Ethereum Price Weekly Analysis – ETH/USD Bearish Below $870"
```
//in android show below code... |
2018/02/25 | 428 | 1,575 | <issue_start>username_0: For an example, there is simple task which makes network call and then maps the result.
```
class Task {
func execute() -> Single {
return doSomeRequest().flatMap { [weak self] data in
if let string = self?.map(data: data) {
return .just(string)
}
return .error(Error())
}
}
func ... |
2018/02/25 | 1,338 | 4,516 | <issue_start>username_0: I have a program that uses 0th bit for something and then bits 7-1 for something else. In order to check bits 7-1 I do a
```
int number = number >> 1;
```
which gives me the bits 7-1.
so for example **1111 1110** becomes **0111 1111**
I am curious if there is an edge case where that left ... |
2018/02/25 | 840 | 2,742 | <issue_start>username_0: I was looking for a pre-built number formatting function and came across this JS function `toLocaleString()`. This function does exactly what I want it to do.
For example, I have a number which I want to be formatted, let's say `1234567890.123`. I want this number to be formatted into `1,23,4... |
2018/02/25 | 1,099 | 4,569 | <issue_start>username_0: so I made an ImageViewer on my app, that uses counting to go through all the pictures. By using the next and prev button. Now I'm trying to add a textview to go with it. So I made another textview under it, and tried this code:
```
View.OnClickListener nButtonChangeImageListener = new View.... |
2018/02/25 | 1,869 | 7,651 | <issue_start>username_0: I want to use CancellationTokenSource stop the Task.
My tests as follow:
Test 1 : Using Cancel() stopped the task sucessfully.
Test 2 : Using CancelAfter() did not stop the task, Why?
The task action is:
```
static Action testFun = () => {
Thread.Sleep(4000); // or other a long ... |
2018/02/25 | 399 | 1,563 | <issue_start>username_0: This may be a very easy question but I'm new to python and I've searched the net however I couldn't solve the problem. I have a csv file which I need to search for a specific word in the columns of its first row. How can I do that?<issue_comment>username_1: I used the default csv module of pyth... |
2018/02/25 | 1,802 | 5,983 | <issue_start>username_0: I am trying to run an Spring-Boot App, but it is giving me following error while running the application as a Java Application
```
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.catalina.C... |
2018/02/25 | 714 | 2,659 | <issue_start>username_0: I have been trying to create a record of a table B using the id of a created record in table A. But for some reason, the field is always null even though i have dumped the value of the model id and it's correct. but when i assign it to a field in table B it doesn't insert it. I don't get any er... |
2018/02/25 | 628 | 2,088 | <issue_start>username_0: I want to send this.data as a parameter for the post request but when I put a console.log(this.data) before the return statement, it returns both token and regNo are null values but inside the then method of storage get, console.log(this.data) gives the correct value. What is going wrong here?
... |
2018/02/25 | 392 | 1,169 | <issue_start>username_0: I need to remove single quotes from the output:
```
['doc1', 'doc2', 'doc3', 'doc4', 'doc5']
```
And keep type to "list".
I've tried, but I got 'str'.
```
doclist = []
for i in range(5):
list_doc_num = 'doc'+str(i+1)
doclist.append(list_doc_num)
print(doclist)
print(type(doclist)... |
2018/02/25 | 698 | 2,515 | <issue_start>username_0: I know about PHP Array Objects but I have never seen laravel models working like this...Its kinda strange. Heres the actual code..
```
public function getUserChats()
{
$users = [];
$chats1 = Chat::where('sender_id','=',auth()->user()->id)->get();
$chats2 = Chat::where('reciever_id... |
2018/02/25 | 545 | 1,960 | <issue_start>username_0: I want to bind some events to an element , using the knockout "event" binding
But I want all of the listed events to be bound only with a specific case.
The viewmodel:
```
function vm(){
var self = this;
self.isEditMode = ko.observable(false);//can be changed to true
self.events = ko.observab... |
2018/02/25 | 4,182 | 13,159 | <issue_start>username_0: I was reading about [`using`-directives on cppreference.com](http://en.cppreference.com/w/cpp/language/namespace#Using-directives) and they had some code I couldn't figure out the order preference for name lookup.
I have read about the [the transitive property of `using`-directives on paragrap... |
2018/02/25 | 1,020 | 3,360 | <issue_start>username_0: My expected result was that is not going to print anything
In the example below if I try to read the code xMethod(5)
as it is a recursive function when =0 i.e. xMethod(0) I was expecting that it should not get into the if statement.
My expectation for this code was that there should not be an... |
2018/02/25 | 869 | 3,157 | <issue_start>username_0: I've read through about ten posts on how to import local modules, and I'm still stumped on why this isn't working. I have an extremely simple module, actor.py, with a single class inside it:
```
class Actor(object):
def __init__(self, name, age):
self.name = name
self.age =... |
2018/02/25 | 589 | 1,809 | <issue_start>username_0: I was wondering if theres any easy and fast way to obtain the decimal value of a signed hex in python.
What I do to check the value of a hex code is just open up python in terminal and type in the hex, it returns the decimal like this:
```
>>>0x0024
36
>>>0xcafe
51966
```
So I was wonderin... |
2018/02/25 | 525 | 1,567 | <issue_start>username_0: In java, if I sort using `Arrays.sort()` (`n log n`) and then use a for loop o(n) in the code, what will be the new complexity ? is it `n^2 log n` or `n log n`<issue_comment>username_1: If you can use NumPy numerical types you could use `np.int16` type conversion
```
>>> import numpy as np
>>>... |
2018/02/25 | 406 | 1,220 | <issue_start>username_0: ```
var arr = [1, 5, 17];
for (let e of arr)
e += 3; // Does nothing
arr.forEach(e => e += 3); // Does nothing
console.log(arr);
```
In the above code my aim was to set all elements to 0 (just as an example), yet, when I use `=` on the element variable, nothing changes. I suspect this ... |
2018/02/25 | 2,296 | 5,323 | <issue_start>username_0: (Using python 3) Here is the task I have been given:
Given a list of numbers, find and print all its elements that are greater than their left neighbor.
Example input
```
1 5 2 4 3
```
Example output
```
5 4
```
Here is my code:
```
# creates a list out of the input given as '# # # # #... |
2018/02/25 | 692 | 2,474 | <issue_start>username_0: For the given array:
```
int array[10];
```
What is the difference between
```
sizeof array / sizeof *array
```
**and**
```
sizeof array / sizeof array[0]
```
when calculating the number of elements in `array`?<issue_comment>username_1: There is none in this case. Both ultimately resul... |
2018/02/25 | 371 | 1,169 | <issue_start>username_0: It would be convenient to redirect `STDERR` during tests. Is this possible in Crystal?<issue_comment>username_1: There is no way of doing it with just the standard library, but there is an external library that does the low-level operation.
<https://github.com/mosop/stdio>
A small Crystal l... |
2018/02/25 | 167 | 707 | <issue_start>username_0: How to create a conditional table in MYSQL? for example I want to create table which should have minimum two records or else records should not be added into table. Consider example like- A band should have at least two members so there should be minimum two records in the table<issue_comment>u... |
2018/02/25 | 363 | 805 | <issue_start>username_0: I has this code
```html
با کدنوسازی
01-01-1034-100100
```
But output is incorrect and shows number right to left(با کدنوسازی 01-01-1034-100100)!
I want this output (01-01-1034-100100)
please help me<issue_comment>username_1: Put text at the end and the number before:
```html
01-01... |
2018/02/25 | 392 | 1,802 | <issue_start>username_0: I have some trouble with setting a checkbox to be unchecked.
I have two fragments, first fragment contains a checkbox and a button, after I check the check box and press the next button, second fragments loads and displays a message. When I press back button, the first fragment reloads and the ... |
2018/02/25 | 1,590 | 3,519 | <issue_start>username_0: Here's the string.
```
{lat: -37.819616, lng: 144.968119},
{lat: -38.330766, lng: 144.695692},
{lat: -39.927193, lng: 175.053218},
{lat: -41.330162, lng: 174.865694},
{lat: -42.734358, lng: 147.439506},
{lat: -42.734358, lng: 147.501315},
{lat: -42.735258, lng: 147.438000},
{lat: -43.999792, l... |
2018/02/25 | 1,099 | 4,959 | <issue_start>username_0: I need to play a custom sound on receiving a push notification in my ios app.
I know, apple don't support the sound alert in silent mode. I have tried sending push notification with custom sound. Its playing when the device is not silent, and vibrates in silent mode.
But, recently I found an... |
2018/02/25 | 1,097 | 4,162 | <issue_start>username_0: I'm trying programmatically set constraints for some labels, buttons, and text fields relative to the height and width of the safe area. For example, I'm hoping to set the distance from the label from the top of the safe area to 10% of the safe area's height.
How can I retrieve the height and ... |
2018/02/25 | 416 | 1,287 | <issue_start>username_0: Below is my html code.
```
[xx](xxx)
<yy>
<zzz>
aaa
<bbb>
ccc
```
I have to get all children of `this` div, i.e [xx,yy,zzz,aaa,bbb,ccc]
But by using the below code i can get only [xx,yy,zzz,bbb]. How to access other 2[aaa,ccc]?
```
const cheerio = require('cheerio');
var $ = cheer... |
2018/02/25 | 1,505 | 4,797 | <issue_start>username_0: I have a method, `ListToString`, that takes a list and outputs the `name` element of all structs in the list. Each struct that I use `ListToString` for has a name element, but because I can't apply `name` to a generic type, I need to create an overload of `ListToString` for each struct. This ha... |
2018/02/25 | 467 | 1,573 | <issue_start>username_0: So I want to add a class on click, and then when it is clicked again, I want to revert it back to the previous class. How is this achieved. I have also tested it using `on()`, but no luck there either.
```js
$('.red').click(function() {
$(this).removeClass('red').addClass('blue');
});
$(... |
2018/02/25 | 866 | 2,856 | <issue_start>username_0: I have been doing a php tutorial on forms. First I got the error undefined index.
After watching some videos I fixed it applying isset function.But still data is not submitted to the database. Before this one I successfully did another simple example with two inputs. I don't understand why it h... |
2018/02/25 | 649 | 2,086 | <issue_start>username_0: I followed the documentation to make Webpack Encore work in my project.
Imported js files in webpack.config.js work fine but I have an issue in page-specific js : `$ is not defined`.
**Webpack.config.js** :
```
const Encore = require('@symfony/webpack-encore');
var webpack = require('webpack'... |
2018/02/25 | 491 | 1,327 | <issue_start>username_0: I have a thymeleaf template that looks like:
```
```
and the menu looks like:
```
......
alert ('lalala');
```
But I don't see the alert when I load the page<issue_comment>username_1: ```
```
Upvotes: 0 <issue_comment>username_2: It works after put it inside a div
```
alert ('lala... |
2018/02/25 | 762 | 2,489 | <issue_start>username_0: I'm using the same page for all my website where only the body content changes, instead of using links I wanna use buttons to load the page content.
Here's my main html page
```
button 1
button 2
```
I want button1 and button2 to load 2 different pages page1 and page2 when clicked<issue_c... |
2018/02/25 | 468 | 1,603 | <issue_start>username_0: Let's say I have
```
a = [1,2,3,4,5]
```
I'm trying to create a dictionary where
```
dictObj = { (key,[]) for key in a}
```
but I'm getting an unhashable type error. This seems weird to me since it's fine if values are lists right? I was wondering if anyone could tell me the correct synt... |
2018/02/25 | 660 | 1,898 | <issue_start>username_0: I have a problem with understanding the [$spacer](https://getbootstrap.com/docs/4.0/utilities/spacing/) variable(?) noted in [Bootstrap 4's Spacing Documentation](https://getbootstrap.com/docs/4.0/utilities/spacing/) and couldn't find any documentation on it.
For example: `1 - (by default) for... |
2018/02/25 | 1,431 | 5,203 | <issue_start>username_0: I need to connect two combox in html to DB with php and use the result from the combox to get something else from the DB
for exemple
```
סוג הפעילות
php while($row = mysqli\_fetch\_array($res)){ ?
php echo $row['NameEx'];}?
תת פעילות
חשב
```
and my javascript is :
```
function s... |
2018/02/25 | 584 | 1,817 | <issue_start>username_0: In a bash script I have to find the running time of a proccess, I do it with this command:
```
PROCCESS_TIME=$(ps -eo pid,etimes | grep $(ps -ef | grep SCREEN | grep PROCCESS | head -1 | awk '{print $2}') | awk '{print $2}')
```
Which gives me running time in seconds,then I need to convert i... |
2018/02/25 | 2,277 | 7,872 | <issue_start>username_0: I use Go logrus and I need to change the format of the output message. I tried several things without success.
What I need is format like this with formatter of logrus
`[error]: datetime - message`
What I've tried without success is this
```golang
logger := &logrus.Logger{
... |
2018/02/25 | 596 | 2,194 | <issue_start>username_0: I switched to **WKWebView** because **UIWebView** is no longer recommended to be used by Apple.
Loading the HTML File from the Container in WebView using this code:
```
let webview = myWKWebViewClass.webview(for: Bundle.main.filename)
webview.scrollView.isScrollEnabled = false
myContainerView... |
2018/02/25 | 1,389 | 4,565 | <issue_start>username_0: I am trying to to get my ghost data to be saved on a mariadb docker container rather than ghosts inbuilt database. Its on docker-compose, where I have:
docker-compose.yml
------------------
```
version: '3'
services:
mariadb-container:
image: mymariadb:latest
restart: always
po... |
2018/02/25 | 431 | 1,243 | <issue_start>username_0: I've just started to learn 6502 because I want to create an Atari 2600 game.
I have tried this code:
```
LDA #$01
STA $01
LDX #$02
TXA
SBC $01
BRK
```
And I get the value A=$00, and flags Z and C set to 1. But I think the value in A must be $01.
If I change the values because I probably do... |
2018/02/25 | 414 | 1,303 | <issue_start>username_0: i have a problem, my Java Script runs out of memory and i dont know why.
Memory usage jumps to almost 2gB when I start the code.
Currently if i comment out this part of my code it works fine:
```
var way = [];
for(var x = 0;x<=way1.length > way2.length?way1.length:way2.length;x++){
way.pus... |
2018/02/25 | 473 | 1,637 | <issue_start>username_0: I can't seem to get a clear answer as to why this is useful.
**[Official Description](http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.add.html)**
>
> Add files, directories, or symbolic links to your working copy and
> schedule them for addition to the repository. They will be uploaded
> an... |
2018/02/25 | 4,848 | 8,244 | <issue_start>username_0: I have this program I am suppose to make for this diagram 4x2 decoder diagram:
I keep trying to change the initial values of the output array from 0 to 1 and 1 to 0 by just negating them but I still never get the desired result.
[4x1 mux](https://i.stack.imgur.com/M5a0C.png)
```
module Decode... |
2018/02/25 | 1,476 | 4,546 | <issue_start>username_0: trying to assign values from one object to another after using the `filter()` function to find the object i want to assign the data to.
my first attempt which didn't work looked like this:
```
if (this.sets.filter(s => s.id === res.body.last_id).length) {
this.sets.filter(s => s.id === res... |
2018/02/25 | 795 | 2,720 | <issue_start>username_0: I have been searching frustratingly for hours and just can not seem to find out how to change the input from the ask function.
```
input = ask ("Input text: ")
```
If anybody can help a newbie out that would be amazing!
I've also provided a script link [here](https://github.com/JEG2/highlin... |
2018/02/25 | 707 | 2,443 | <issue_start>username_0: I have a 'varchar(MAX)' datatype column in SQL server table which I want to alter into 'int' datatype. Does it results in loss of data.<issue_comment>username_1: Just call `downcase!` (or `downcase` according to your sitation) on `input` variable.
Like this,
```
input = ask("Input text").down... |
2018/02/25 | 3,572 | 12,806 | <issue_start>username_0: After debugging, the problem is that mvc configuration class EnableWebMvcConfiguration load too early, servlet not loaded yet.
```
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework... |
2018/02/25 | 1,868 | 7,418 | <issue_start>username_0: I have a problem with testing my controller in my application.
First, I have a `Person` class:
```
public class Person extends Model {
@Id
public UUID id;
public static final Finder find = new Finder<>(Person.class);
@Constraints.Required
@Constraints.MinLength(0)
@Constrain... |
2018/02/25 | 982 | 3,928 | <issue_start>username_0: Here is the scenario:
```
Set> st=hashMap.entrySet();
for(Map.Entry me : set)
{
System.out.println(me.getKey()+":"+me.getValue());
}
```
Now my question is if Set,Map,Entry all are interfaces and getKey() and getValue() are the methods inside Entry interface how can Map.Entry call them with... |
2018/02/25 | 197 | 589 | <issue_start>username_0: * Customer c2 balance increase by amt - interest \* //This is the instruction.
I assigned Customer c2 to k2.
k2=(k2 + amt)-2
As you can see, I am increasing Customer c2 by the value of amt. The interest rate is 2%. I want to subtract by 2% but I don't know how to.<issue_comment>username_1: k... |
2018/02/25 | 406 | 1,581 | <issue_start>username_0: This is the structure of my views: A top view vertically over a bottom view. There is a constraint between the two views, and there is an X that sets the vertical distance of the views to 0.
I'm doing an animation to move out (in the top side) of the top view. Doing that that bottom view shoul... |
2018/02/25 | 1,160 | 3,860 | <issue_start>username_0: I have a string that i need to cut the string after the first '' or space. Example: `Demo Road Anytown EC4 5RT`. I need to just have Demo Road and cut the rest.
I have looked at chop, explode, substr but cannot seem to get it to work. I would be grateful if someone could help with this request... |
2018/02/25 | 1,630 | 5,436 | <issue_start>username_0: I have 7 ViewControllers, first one is navigate to the five view controllers and the last one is to collect the data entering by user using text fields and replace them with local html form. I could get only data from one VC. So my question is how to get all the data entering from all VCs. here... |
2018/02/25 | 1,196 | 3,965 | <issue_start>username_0: I am trying to move the cursor within the textbox in zk.
I made this code so if we are at second intbox and enter a number the control/cursor will move to the third intbox.
Now what I want to achieve is suppose we are at intbox 4 and we hit backspace the cursor/control should move to third ... |
2018/02/25 | 406 | 1,793 | <issue_start>username_0: I am working on LINQ query with Left-Join and groupBy, so I have list of questions which may or may not have answer collections. I want all the question group by question and their answer list, if it is null then don't want to add.
My current solution works fine but it still add a list with nu... |
2018/02/25 | 351 | 1,383 | <issue_start>username_0: I am developing a simple app for Max OS X for making screenshots using Swift language. After screenshot was made, I convert it into a base64 string using:
```
screenshot.base64EncodedString()
```
I have a simple .php file on my server for saving this base64 string into MySQL database. Everyt... |
2018/02/25 | 568 | 1,743 | <issue_start>username_0: I am trying to create a nested dictionary, whereby the key to each nested dictionary is named from the value from a variable. My end result should look something like this:
```
data_dict = {
'jane': {'name': 'jane', 'email': '<EMAIL>'},
'jim': {'name': 'jim', 'email': '<EMAIL>'}
}
``... |
2018/02/25 | 1,914 | 7,723 | <issue_start>username_0: Need to group `List` based upon N property fields, This fields are decided at run time. How can I achieve this ?
[Group by multiple field names in java 8](https://stackoverflow.com/questions/28342814/group-by-multiple-field-names-in-java-8)
Referred this question, it is using fixed number of f... |
2018/02/25 | 931 | 2,529 | <issue_start>username_0: Table:
```
| User_ID | Red | Blue | Green | Rating |
| a | 23 | 33 | 42 | 99 |
| a | 56 | 45 | 62 | 45 |
| a | 23 | 49 | 28 | 67 |
| b | 39 | 59 | 10 | 87 |
| b | 18 | 28 | 59 | 38 |
| b | 40 | ... |
2018/02/25 | 586 | 1,882 | <issue_start>username_0: Why compiler thinks that the expression `1 + m=6 + 2` is evaluated to boolean? **Compiler (Eclipse) says that the result of this expression is *boolean*. Why?** Priority of = is lowest, so first + is done and `1+m` shall fail with "unitialized local variable" compile error. If I declare `int m ... |
2018/02/25 | 390 | 1,172 | <issue_start>username_0: I have a problem,
**in Html**
```
One
Two
Three
Four
```
**in JS**
```
var random = Math.floor(Math.random() * $('.item').length);
$('.item').hide().eq(random).show();
```
I need add class **(no-active)** of automatically and randomly in the div with class **(item)**, but no for all divs... |
2018/02/25 | 396 | 1,289 | <issue_start>username_0: I know how to change colors if certain values match, as shown below.
How can I do for change foreground color not only same, but also values are included.
(Like `String.Contain(Value)`)
```
<Style.Triggers>
<DataTrigger Binding="{Binding permission}" Value="Pass">
<Setter Property="Fore... |
2018/02/25 | 507 | 1,942 | <issue_start>username_0: I have downloaded a sample code of Java OpenCV. In few lines of the code there is `FeatureDetectore()` method that the compiler says it's deprecated.
```
FeatureDetector detector = FeatureDetector.create(FeatureDetector.MSER);
detector.detect(mGrey, keypoint);
listpoint = keypoint... |
2018/02/25 | 808 | 2,986 | <issue_start>username_0: I have a table `notices`. Model for this table is `Notice.php`
In this table I have `notice` and `id` column.
I have fetched all notices from `notices` table and viewed in my view. Here is my controller code for fetching all notices.
```
public function index()
{
$notice = Notice::orderBy(... |
2018/02/25 | 544 | 1,839 | <issue_start>username_0: I have below code for grid view in PHP
```
| | | |
| --- | --- | --- |
|
Plan 1 | $5 per month | |
|
Plan 2 | $5 per month | |
|
Plan 3 | $5 per month | |
```
The above **'tr'** can be multiple on basic of DB data. My requirement is that whenever I click on Radio button the inpu... |
2018/02/25 | 612 | 2,065 | <issue_start>username_0: I have a procedure which has a structure as given below:
```
PROCEDURE broker(prm_qgent in varchar2, prm_cursor out sys_refcursor)
IS
mmy_query varchar(200);
BEGIN
OPEN prm_cursor FOR SELECT * FROM DUAL;
mmy_query :='SELECT *some dynamic query* where 1=1';
if prm_agent is not null th... |
2018/02/25 | 523 | 1,780 | <issue_start>username_0: I have some trouble when I Joining 3 tables, I use mysqli procedural. here's my query..
```
$select = $connection->conn->query('SELECT * FROM master_beli, supplier, karyawan WHERE supplier.id_supplier = master_beli.id_supplier AND karyawan.id_karyawan = master_beli.id_karyawan');
```
After t... |
2018/02/25 | 456 | 1,602 | <issue_start>username_0: i have a problem with Sonata Admin bundle. (Symfony version 3.3.11, Sonataadmin 3.24) On localhost everything works fine, but on server all styles and scripts placed in web/bundles/sonataadmin and web/bundles/sonatacore directories is not loaded with error 403. Permission of directories is 777 ... |
2018/02/25 | 159 | 682 | <issue_start>username_0: When i create new controller always throw an error "Controller'] is namespace but is used like a type".I dont know how to fix it i hve install the package.[enter image description here](https://i.stack.imgur.com/f9ODS.jpg)<issue_comment>username_1: change the folder name to Controllers and name... |
2018/02/25 | 1,057 | 4,424 | <issue_start>username_0: [](https://i.stack.imgur.com/obRzW.jpg)
As in my algorithm, how to make Application.java only run in Main menu ONLY
and as for now, MyApplication.java run on every activities. i already try this on my main menu, but did not wo... |
2018/02/25 | 1,473 | 5,236 | <issue_start>username_0: I'm trying to sort a vector of items. As mentioned in the code comments, the ordering should be:
Participants with more action points (`mAp`) go first. When there is a tie, participants with the same disposition (`mDisposition`) as the initiator of the battle (`mBattleInitiator`) go first.
Th... |
2018/02/25 | 563 | 1,934 | <issue_start>username_0: After submit a form, I want to redirect to an specific view passing one flag=True in order to activate a popup like:
```
def view1(request):
if request.method == 'POST':
form = Form(request.POST)
if form.is_valid():
form.save()
return redirect('new_v... |
2018/02/25 | 855 | 2,831 | <issue_start>username_0: I want to simpler code using Rails e.g I have an HTML dropdown code like below
```
Job City
<% City.all.each do |city| %>
<%= city.name %>
<% end %>
```
above code are fine, working as expected e.g select one and insert this.
I want to convert something like this as a Rails
```
<%= s... |
2018/02/25 | 937 | 3,204 | <issue_start>username_0: I need to implement a simple python application inside Docker.
I followed the instruction: <https://docs.docker.com/get-started/part2/#dockerfile>
I run a build command like that:
```
sudo docker build -t sender .
```
My requirements.txt looks the following way:
```
pika==0.11.2
```
And... |
2018/02/25 | 430 | 1,411 | <issue_start>username_0: Hello I test OpenACC vs OpenMP vs Nothing, but i get strange result.
* Code:
```
#include
int main () {
int a,sum=0;
(#pragma omp for/#pragma acc parallel loop/nothing)
for( a = 0 ; a < 2000000000; a = a + 1 ){
sum+=a%2;
}
printf("sum = %d\n",sum);
return 0;
}
```
1. I use sub... |
2018/02/25 | 388 | 1,452 | <issue_start>username_0: I have written code in C# and integrated it with SQL Server, but each time I run it I keep getting this error:
>
> System.Data.SqlClient.SqlException: 'Incorrect syntax near ';'.'
>
>
>
My code is this:
```
private void btnsubmit_Click(object sender, EventArgs e)
{
var connectiontrin... |
2018/02/25 | 550 | 1,782 | <issue_start>username_0: I'm writing a C program that is meant to return the temperature of five cities and I'm quite stuck.
I created a for loop to loop through the array of cities I created and another one to loop through another array of temperatures.
Here's the code:
```
// program to accept yearly temperature ... |
2018/02/25 | 906 | 3,082 | <issue_start>username_0: This is an equation to check whether 1 of the 3 elements has value. If yes, all elements must have a value:
```
if( (a!='' || b!='' || c!='') && (a=='' || b=='' || c=='') )
alert('Please fill all elements');
```<issue_comment>username_1: This may not seem shorter for 3 variables, ... |
2018/02/25 | 276 | 1,271 | <issue_start>username_0: I am making a simple spring security project. I used Angular for front-end. For authentication i am calling access token from backend but there in no any CORS enable in spring. How can i enable CORS. This is code to get access token
```
```<issue_comment>username_1: Sorry, I don't know how t... |
2018/02/25 | 753 | 2,565 | <issue_start>username_0: Following this [solution](https://stackoverflow.com/a/32231314/5057736) I have the following class:
```
com.temp.System = class {
static initialize() {
this.foo = 9;
console.log("foo 1 is: " + this.foo);
}
static testMe() {
console.log("foo 2 is: " + this.f... |
2018/02/25 | 1,647 | 5,345 | <issue_start>username_0: I have been working on a Processing 3 project to create scale-able noise images generated from a normal image.
The script takes a normal image, converts it into a black and white image then generates two complimentary noise patterns that can be overlaid to get the original image.
[ as
begin
delete from vehicle_count;
insert into vehicle_count from select engine_no,count(engine_no)
from vehicle
where engine_no = num
group by engine_no;
end;
/
```
The proce... |
2018/02/25 | 500 | 2,005 | <issue_start>username_0: That's a bit silly, but I'm really missing the point here. I have a Spring Boot working app, the main Application class is
```
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Applicatio... |
2018/02/25 | 280 | 1,082 | <issue_start>username_0: I have code as follows
Declare.cs
```
Class B { }
Class D1 : B { public var1 }
Class D2 : B {}
B Baseobject = new B();
if(baseobject is D1){ Console.print(B.var1) }
```
When I compile this scenario I always get compiler error that `var1` is not accessible to `B`. If `var1` always needs to ... |
2018/02/25 | 581 | 2,170 | <issue_start>username_0: In TypeScript, we can have generic classes like in C#:
```
export class MyClass { }
```
But is it possible to pass a variable number of generics as argument? I mean something like
```
function withVariableArgs(...args: any[]){ }
```
However I lke to have this as generic (pseudo code)
... |
2018/02/25 | 294 | 964 | <issue_start>username_0: Is it possible to do something like `ssh-keygen -t rsa -b 4096` in pure vanilla Node?
I have a feeling [crypto](https://nodejs.org/api/crypto.html) can do this?<issue_comment>username_1: There are no variadic types in Typescript. It has been proposed **many** times. However, you can sort of ge... |
2018/02/25 | 331 | 1,373 | <issue_start>username_0: I've just created an app (slash command) and install it in one of my workspaces. But now I want to add the same app to another one. Is it possible without distribution to App Directory?<issue_comment>username_1: Found the answer, in the small grey caption in the app creation form
>
> Your app... |