qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
71,574
> > An African king walked into a bar wearing a military hat. Only one third of his abs were trained – this was no Romeo. The radio was playing Latin music without any mention of a sun god. His hands were trembling as he ordered his drink. > > > What did he order?
2018/09/06
[ "https://puzzling.stackexchange.com/questions/71574", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
To expand on this: An African king walked into a bar wearing a military hat. > > Maybe this is Shaka (Zulu) wearing a [PAC-Cap](http://www.militarypridegroup.com/clothing/hats/world-war-ii-veteran-pac-hat-usa-made.html) as shown here. > > > Only one third of his abs were trained – > > One third of a six pac...
Partial answer: > > Sounds like something to do with Tupac. One third of a six pack of abs would be a two pack, also he was black and one of the most popular rappers ever which fits African king. He was also incredibly popular with Latin Americans. > Unfortunately I don't really follow rap and I am not familiar wit...
71,574
> > An African king walked into a bar wearing a military hat. Only one third of his abs were trained – this was no Romeo. The radio was playing Latin music without any mention of a sun god. His hands were trembling as he ordered his drink. > > > What did he order?
2018/09/06
[ "https://puzzling.stackexchange.com/questions/71574", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
Working from other people's answers and putting everything together: He ordered a ... > > **shake**. > > > There is ... > > a pattern in the text, which, with a bit of wordplay gives four similar words ending in a vowel: The African king is Zulu chief **Shaka**. The military hat is a **shako**. The third of ...
Partial answer: > > Sounds like something to do with Tupac. One third of a six pack of abs would be a two pack, also he was black and one of the most popular rappers ever which fits African king. He was also incredibly popular with Latin Americans. > Unfortunately I don't really follow rap and I am not familiar wit...
71,574
> > An African king walked into a bar wearing a military hat. Only one third of his abs were trained – this was no Romeo. The radio was playing Latin music without any mention of a sun god. His hands were trembling as he ordered his drink. > > > What did he order?
2018/09/06
[ "https://puzzling.stackexchange.com/questions/71574", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/41973/" ]
Working from other people's answers and putting everything together: He ordered a ... > > **shake**. > > > There is ... > > a pattern in the text, which, with a bit of wordplay gives four similar words ending in a vowel: The African king is Zulu chief **Shaka**. The military hat is a **shako**. The third of ...
To expand on this: An African king walked into a bar wearing a military hat. > > Maybe this is Shaka (Zulu) wearing a [PAC-Cap](http://www.militarypridegroup.com/clothing/hats/world-war-ii-veteran-pac-hat-usa-made.html) as shown here. > > > Only one third of his abs were trained – > > One third of a six pac...
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had the same issue. Caused because I was importing the material theme before the fonts in my theme.scss. Should be: ``` @import url( 'https://fonts.googleapis.com/css?family=Roboto:400,700|Material+Icons'); @import '~@angular/material/theming'; ```
Ran into this in Angular 6, solution ended up being adding mat-icon-button, ``` <button mat-icon-button type="button" (click)="yourMethod()"> <mat-icon>delete</mat-icon> </button> ``` Make sure you add MatIconModule to your app.module.ts imports and it should work like a charm.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
`<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">` make sure this has been added to your index.html.
Check your console for miscellaneous errors. If you have a miscellaneous error in your component it could be preventing your `mat-icon` from initializing properly and you'll just see the textual representation of the glyph instead.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had made my own text font `!important` had to make the icons more important: ``` .lato * { font-family: 'Lato' !important; } .mat-icon{ font-family: 'Material Icons' !important; } ```
I faced same issue, instead of icon "close" text was coming for me. It was internet issue , internet was slow so maticon module was not loaded properly. Reconnecting with good network strength solved my issue.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had the same issue. Caused because I was importing the material theme before the fonts in my theme.scss. Should be: ``` @import url( 'https://fonts.googleapis.com/css?family=Roboto:400,700|Material+Icons'); @import '~@angular/material/theming'; ```
consider using google CDN instead by adding the following to your `index.html`: ``` <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> ``` **Edit:** move/download the CSS file and place it in your assets folder and then in your `angular-cli.json` you add the following to your sty...
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had the same issue, because I forgot to add the module on NgModule.imports : ``` @NgModule({ imports: [ MatIconModule ] }) ```
Ran into this in Angular 6, solution ended up being adding mat-icon-button, ``` <button mat-icon-button type="button" (click)="yourMethod()"> <mat-icon>delete</mat-icon> </button> ``` Make sure you add MatIconModule to your app.module.ts imports and it should work like a charm.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
consider using google CDN instead by adding the following to your `index.html`: ``` <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> ``` **Edit:** move/download the CSS file and place it in your assets folder and then in your `angular-cli.json` you add the following to your sty...
Check your console for miscellaneous errors. If you have a miscellaneous error in your component it could be preventing your `mat-icon` from initializing properly and you'll just see the textual representation of the glyph instead.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had made my own text font `!important` had to make the icons more important: ``` .lato * { font-family: 'Lato' !important; } .mat-icon{ font-family: 'Material Icons' !important; } ```
I had the same issue, because I forgot to add the module on NgModule.imports : ``` @NgModule({ imports: [ MatIconModule ] }) ```
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had the same issue. Caused because I was importing the material theme before the fonts in my theme.scss. Should be: ``` @import url( 'https://fonts.googleapis.com/css?family=Roboto:400,700|Material+Icons'); @import '~@angular/material/theming'; ```
`<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">` make sure this has been added to your index.html.
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
I had the same issue. Caused because I was importing the material theme before the fonts in my theme.scss. Should be: ``` @import url( 'https://fonts.googleapis.com/css?family=Roboto:400,700|Material+Icons'); @import '~@angular/material/theming'; ```
I had the same issue, because I forgot to add the module on NgModule.imports : ``` @NgModule({ imports: [ MatIconModule ] }) ```
46,632,946
Material icon not rendering properly in my project, i installed properly but even though not showing in browser. i followed below steps: ``` npm install material-design-icons ``` *.angular-cli.json* ``` "styles": [ "styles.css", "../node_modules/material-design-icons/iconfont/material-icons.css" ...
2017/10/08
[ "https://Stackoverflow.com/questions/46632946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3243084/" ]
consider using google CDN instead by adding the following to your `index.html`: ``` <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> ``` **Edit:** move/download the CSS file and place it in your assets folder and then in your `angular-cli.json` you add the following to your sty...
I faced same issue, instead of icon "close" text was coming for me. It was internet issue , internet was slow so maticon module was not loaded properly. Reconnecting with good network strength solved my issue.
394,159
I'm a beginner in electronics. I tried making a hovercraft that looks like this: [![](https://i.stack.imgur.com/5lpyq.jpg)](https://i.stack.imgur.com/5lpyq.jpg) The bottom looks like this: [![enter image description here](https://i.stack.imgur.com/78WqB.jpg)](https://i.stack.imgur.com/78WqB.jpg) And the battery used ...
2018/09/03
[ "https://electronics.stackexchange.com/questions/394159", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/197568/" ]
I have several ideas about your design: 1) The battery is indeed not good enough. Those 9V batteries are not made to supply 'relatively large' currents, like your motor will ask. So you need a better battery. 2) The skirt needs to be shaped differently indeed. The idea is that the air is 'held' underneath the hovercr...
The major principle of hovercraft is to suck air in, and force the air to escape along the hovercraft skirt. In your design the propeller is completely blocked, and no air flows in. This is aerodynamics, not electronics, especially if your electrical arrangement allows your propeller to "spin fast" for the whole minute...
62,063
It seems that something about the way I have jumped between Cycles and Blender render has caused issues with a file. I am new to render engines and not that experienced in Blender in general, so I have been disorganized about things and have ended up having to jump around. Right now I want to do up this model with a ...
2016/08/31
[ "https://blender.stackexchange.com/questions/62063", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/7548/" ]
Cycles materials are node materials, and the majority are not compatible with Blender Renderer. Changing them back to "normal" materials by toggling the nodes in the material tab under preferences view will fix their "blackness".
I suspect that you haven't Assigned the new material to all the faces in the object. For any object that you're having trouble with, tab into edit mode, select all the faces, select the correct material in the materials list, and click "Assign" under the materials list. This will make all the faces use that material. ...
62,063
It seems that something about the way I have jumped between Cycles and Blender render has caused issues with a file. I am new to render engines and not that experienced in Blender in general, so I have been disorganized about things and have ended up having to jump around. Right now I want to do up this model with a ...
2016/08/31
[ "https://blender.stackexchange.com/questions/62063", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/7548/" ]
Cycles materials are node materials, and the majority are not compatible with Blender Renderer. Changing them back to "normal" materials by toggling the nodes in the material tab under preferences view will fix their "blackness".
Blender render relies on light. Moving around the light source (or adding several) will fix this, thats why people often use cycles for testing the textures first. [![enter image description here](https://i.stack.imgur.com/AuNBE.gif)](https://i.stack.imgur.com/AuNBE.gif)
8,083,546
> > **Possible Duplicate:** > > [Why do multiple-inherited functions with same name but different signatures not get treated as overloaded functions?](https://stackoverflow.com/questions/5368862/why-do-multiple-inherited-functions-with-same-name-but-different-signatures-not) > > > This fails to compile in the ...
2011/11/10
[ "https://Stackoverflow.com/questions/8083546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4323/" ]
I think it has something to do with hiding the function(s) in the base classes, and the GCC's error message doesn't seem to help much, even if you use `struct` instead of `enum` : In fact, the error message is misleading, because now `Ea` and `Eb` are two different classes, with **no implicit conversion** from `Ea` to ...
Trying to understand the actual text in the standard (§10.2) isn't easy, but there is an example which makes it clear: name lookup for a name `x` in the derived class fails if the name isn't present in the derived class, but it is present in more than one base class, and it isn't hidden. (Hidden isn't relevant here, as...
53,179,916
I'm following along with this tutorial for Webtoolkit: <https://www.webtoolkit.eu/wt/doc/tutorial/wt.html> I am running all this on a Rasbian/Debian on a Virtual Machine and I am using C++14 I decided to copy paste the hello.cpp code onto my Desktop and am compiling it like this on my terminal as I was facing linking...
2018/11/06
[ "https://Stackoverflow.com/questions/53179916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4297337/" ]
Per the following MSDN documentation: [Default Marshaling Behavior](https://learn.microsoft.com/en-us/dotnet/framework/interop/default-marshaling-behavior) > > **The interop marshaler always attempts to free memory allocated by unmanaged code**. This behavior complies with COM memory management rules, but differs fr...
Thanks a lot @Remy Lebeau. I've tried implementing the CoTaskMemAlloc() method and it works!. My code is as follows: In the **cpp** file i've edited the return value to be allocated using the CoTaskMemAlloc() ``` char* CPMfn(char* sdatabase, int project_num) { /* Retrieve data from database and calculate CPM for th...
33,189,037
I defined a function called zip which took two lists as parameters and returned a list of pairs. ``` (define (zip list1 list2) (if (null? list1) '() (cons (list (cons (car list1) (car list2))) (zip (cdr list1) (cdr list2))))) (zip (list 1 3 5) (list 2 4 6)) > (((1 . 2)) ((3 . 4)) ((5 . 6))) ``` No...
2015/10/17
[ "https://Stackoverflow.com/questions/33189037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5457515/" ]
I believe there's a problem with your implementation of `zip`, did you notice that you're returning a list of single-element lists of pairs? returning a list of pairs makes more sense: ``` (define (zip lst1 lst2) (if (null? lst1) '() (cons (cons (car lst1) (car lst2)) (zip (cdr lst1) (cdr lst...
As you make it with pairs it's somewhat more difficult but not much: ``` (define (zip-pair a b) (map cons a b)) (define (unzip-pair zipped-pair) (list (map car zipped-pair) (map cdr zipped-pair))) ``` `zip` is [usually implemented](http://srfi.schemers.org/srfi-1/srfi-1.html#Miscellaneous) with `apply`...
57,709,233
Why we need `DB::rollback()` when we can execute multiple queries without using it. Such as follows: ``` DB::beginTransaction(); //database queries here //even if any errors pop up here, it won't reach DB::commit() and code won't get committed DB::commit(); ``` In the above case, **even if any statement fails, co...
2019/08/29
[ "https://Stackoverflow.com/questions/57709233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4237402/" ]
Rollbacks, in general, are not used so that your current flow stops if some error occurs but they are used so that whatever changes you have done regarding transaction or DB till the point of error can be undone. So, it is not mandatory, but it is highly advisable for only keeping the relevant data.
ROLLBACK In my case I use rollback when I use payment process like I have to create user with full information after that user have to pay registration fees using Paypal account , if it fails to pay user information will be rollback
57,709,233
Why we need `DB::rollback()` when we can execute multiple queries without using it. Such as follows: ``` DB::beginTransaction(); //database queries here //even if any errors pop up here, it won't reach DB::commit() and code won't get committed DB::commit(); ``` In the above case, **even if any statement fails, co...
2019/08/29
[ "https://Stackoverflow.com/questions/57709233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4237402/" ]
Rollbacks, in general, are not used so that your current flow stops if some error occurs but they are used so that whatever changes you have done regarding transaction or DB till the point of error can be undone. So, it is not mandatory, but it is highly advisable for only keeping the relevant data.
Use of Rollback:- ``` DB::beginTransaction(); try{ //save in table 1 //save in table 2 //save in table 3....with a sql error DB::commit(); }catch(){ DB::rollback(); //if rollback due to error occurs in query 3 then no data will be saved in table 1 and 2...Not Mandatory } ```
39,462,321
I'm making a JavaFX application that has a toggle button. I want a while loop to run as long as the button is toggled and stop when the button is toggled off. Right now in the program, the while loop activates when I press the button but the loop does not stop when I toggle off the button. Is there something I'm missin...
2016/09/13
[ "https://Stackoverflow.com/questions/39462321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4889821/" ]
Running a *while* loop on the FX Application thread will block this thread, which means that no more interaction with the GUI is possible. The condition of your *while* loop will never change, because of the `selectedProperty` of the `ToggleButton` will never change as the execution never exits the *while* loop. You ...
``` if(button.isSelected()) { while(button.isSelected()) //Only runs when the button has been toggled { int randomInt = (int )(Math.random() * 37 + 1); System.out.println(keyMap.get(randomInt)); } } ``` this should work
58,584,994
I'm trying to create a custom visual in Power Bi using Python script. My data source is from my excel file and it load properly. But whenever I will type my script in the python script editor and execute it, it always giving me the same error of can't display this visual. Anyone who can help me resolve this? [Error Me...
2019/10/28
[ "https://Stackoverflow.com/questions/58584994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10068130/" ]
I finally solved the same problem thanks to frustration. The working solution felt impossible to me as a python coder. I though I was supposed to modify the two automatically generated dataset related comment lines to code by deleting the `\#` from the beginning of those lines. How my code looks like now and display w...
This error happens mostly not only because of a connection to a python script but also connections to SQL connector or even just an update from Power Bi. Check the recent changes in Power BI every month to see if any affect your problem. Also, check your transformations and data types. You may be using text instead of ...
64,958,242
I have setup [Node.js Express API with TypeScript 3](https://i.stack.imgur.com/20hzY.png) and it is working fine. I got an issue when I try to update the record. RecordsRouter.ts ``` import { Router } from 'express'; import {RecordComponent} from '../../components'; const router: Router = Router(); router.get('/', R...
2020/11/22
[ "https://Stackoverflow.com/questions/64958242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144924/" ]
You can simply use `role.members` ```py @commands.command() # ↓ This will make sure that the argument passed is a discord.Role object async def mom(self, ctx, role: discord.Role): members = role.members for member in members: await ctx.send(f'{member.display_name} - {member.id}') ``` Refer...
I believe there is something called `role.members` which returns all the members with the role "role". Here is an example of the code: ``` @commands.command(pass_context=True) @commands.has_permissions(manage_messages=True) async def mom(self,ctx, *args): server = ctx.message.guild role_name = (' '.join(args))...
23,817,681
I was wondering what is the scope of a passed in callback function in Javascript. ``` callback = function() { alert('hello'); } func1 = function() { func2(callback); } func2 = function(callback) { func3(callback); } func3 = function(callback) { callback(); } ``` When I call func1() .. it seems as...
2014/05/22
[ "https://Stackoverflow.com/questions/23817681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1380431/" ]
Seems you need to extend the Spinner View to make your own AlertDialog that shows the list of items, or in newer version (API 16+) you can use `android:dropDownHorizontalOffset="-8dp"` check the full details here: [How to change the position of opened spinner?](https://stackoverflow.com/questions/5907626/how-to-chan...
Try this, This should work ``` <style name="DropDownStyle"> <item name="android:layout_width">0dp</item> ```
23,817,681
I was wondering what is the scope of a passed in callback function in Javascript. ``` callback = function() { alert('hello'); } func1 = function() { func2(callback); } func2 = function(callback) { func3(callback); } func3 = function(callback) { callback(); } ``` When I call func1() .. it seems as...
2014/05/22
[ "https://Stackoverflow.com/questions/23817681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1380431/" ]
Seems you need to extend the Spinner View to make your own AlertDialog that shows the list of items, or in newer version (API 16+) you can use `android:dropDownHorizontalOffset="-8dp"` check the full details here: [How to change the position of opened spinner?](https://stackoverflow.com/questions/5907626/how-to-chan...
I don`t know it is possible, because all view item like Spinner, EditText, etc... are small images in the android SDK. You should check, is there any default padding in the 9patched SDK image, if yes, I think you can`t do it. Also, don`t forget to check the base Spinner class in Android sourcode, maybe there are some t...
23,817,681
I was wondering what is the scope of a passed in callback function in Javascript. ``` callback = function() { alert('hello'); } func1 = function() { func2(callback); } func2 = function(callback) { func3(callback); } func3 = function(callback) { callback(); } ``` When I call func1() .. it seems as...
2014/05/22
[ "https://Stackoverflow.com/questions/23817681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1380431/" ]
Try this, This should work ``` <style name="DropDownStyle"> <item name="android:layout_width">0dp</item> ```
I don`t know it is possible, because all view item like Spinner, EditText, etc... are small images in the android SDK. You should check, is there any default padding in the 9patched SDK image, if yes, I think you can`t do it. Also, don`t forget to check the base Spinner class in Android sourcode, maybe there are some t...
23,817,681
I was wondering what is the scope of a passed in callback function in Javascript. ``` callback = function() { alert('hello'); } func1 = function() { func2(callback); } func2 = function(callback) { func3(callback); } func3 = function(callback) { callback(); } ``` When I call func1() .. it seems as...
2014/05/22
[ "https://Stackoverflow.com/questions/23817681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1380431/" ]
Is what you want something like this? [![enter image description here](https://i.stack.imgur.com/R1pTh.png)](https://i.stack.imgur.com/R1pTh.png) If so, here is the code (works until API level 9) : **Activity:** ``` public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) ...
Try this, This should work ``` <style name="DropDownStyle"> <item name="android:layout_width">0dp</item> ```
23,817,681
I was wondering what is the scope of a passed in callback function in Javascript. ``` callback = function() { alert('hello'); } func1 = function() { func2(callback); } func2 = function(callback) { func3(callback); } func3 = function(callback) { callback(); } ``` When I call func1() .. it seems as...
2014/05/22
[ "https://Stackoverflow.com/questions/23817681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1380431/" ]
Is what you want something like this? [![enter image description here](https://i.stack.imgur.com/R1pTh.png)](https://i.stack.imgur.com/R1pTh.png) If so, here is the code (works until API level 9) : **Activity:** ``` public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) ...
I don`t know it is possible, because all view item like Spinner, EditText, etc... are small images in the android SDK. You should check, is there any default padding in the 9patched SDK image, if yes, I think you can`t do it. Also, don`t forget to check the base Spinner class in Android sourcode, maybe there are some t...
25,278,274
I'm using a great bootstrap 3 layout that use an "offcanvas" sidebar. All is working great on all screen size. The HTML tag that triggered the sidebar is : ``` <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> ``` How could i trigger this event with jquery ?? Sometimes i need to t...
2014/08/13
[ "https://Stackoverflow.com/questions/25278274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2425096/" ]
Use the `collapse()` method that comes with Bootstrap. Something like ``` $('.sidebar-toggle').collapse(); ``` should work. See the link below for more info on `collapse()`: <http://getbootstrap.com/javascript/#collapse-usage>
I found another solution using css only. I closely inspect the dom change when the toggle button is hit and i replicate those changes when i need to toggle the sidebar. I'm sure there's a jscript method to call but after several hours searching the web, the css solution is fine...
25,278,274
I'm using a great bootstrap 3 layout that use an "offcanvas" sidebar. All is working great on all screen size. The HTML tag that triggered the sidebar is : ``` <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> ``` How could i trigger this event with jquery ?? Sometimes i need to t...
2014/08/13
[ "https://Stackoverflow.com/questions/25278274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2425096/" ]
Use the `collapse()` method that comes with Bootstrap. Something like ``` $('.sidebar-toggle').collapse(); ``` should work. See the link below for more info on `collapse()`: <http://getbootstrap.com/javascript/#collapse-usage>
Add the sidebar-collapse class to the body tag to get this layout.
25,278,274
I'm using a great bootstrap 3 layout that use an "offcanvas" sidebar. All is working great on all screen size. The HTML tag that triggered the sidebar is : ``` <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> ``` How could i trigger this event with jquery ?? Sometimes i need to t...
2014/08/13
[ "https://Stackoverflow.com/questions/25278274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2425096/" ]
Classname: "sidebar-collapse" is responsible for collapsing the sidebar. For example: `<body id="bodyContainer" class="hold-transition skin-blue sidebar-mini sidebar-collapse">` This is for collapsed sidebar. ``` <body id="bodyContainer" class="hold-transition skin-blue sidebar-mini"> ``` This is for non-collapse...
I found another solution using css only. I closely inspect the dom change when the toggle button is hit and i replicate those changes when i need to toggle the sidebar. I'm sure there's a jscript method to call but after several hours searching the web, the css solution is fine...
25,278,274
I'm using a great bootstrap 3 layout that use an "offcanvas" sidebar. All is working great on all screen size. The HTML tag that triggered the sidebar is : ``` <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> ``` How could i trigger this event with jquery ?? Sometimes i need to t...
2014/08/13
[ "https://Stackoverflow.com/questions/25278274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2425096/" ]
Add the sidebar-collapse class to the body tag to get this layout.
I found another solution using css only. I closely inspect the dom change when the toggle button is hit and i replicate those changes when i need to toggle the sidebar. I'm sure there's a jscript method to call but after several hours searching the web, the css solution is fine...
25,278,274
I'm using a great bootstrap 3 layout that use an "offcanvas" sidebar. All is working great on all screen size. The HTML tag that triggered the sidebar is : ``` <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> ``` How could i trigger this event with jquery ?? Sometimes i need to t...
2014/08/13
[ "https://Stackoverflow.com/questions/25278274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2425096/" ]
Classname: "sidebar-collapse" is responsible for collapsing the sidebar. For example: `<body id="bodyContainer" class="hold-transition skin-blue sidebar-mini sidebar-collapse">` This is for collapsed sidebar. ``` <body id="bodyContainer" class="hold-transition skin-blue sidebar-mini"> ``` This is for non-collapse...
Add the sidebar-collapse class to the body tag to get this layout.
17,825,857
I have a function in Go that returns two values. I want to run this as a goroutine, but I can't figure out the syntax for creating a channel that receives two values. Could someone point me in the right direction?
2013/07/24
[ "https://Stackoverflow.com/questions/17825857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/58109/" ]
Define a custom type with fields for both values, then create a `chan` of that type. EDIT: I've also added an example (right at the bottom) that uses multiple channels rather than a custom type. I'm not sure which is more idiomatic. For example: ``` type Result struct { Field1 string Field2 int } ``` then ...
Another option would be to use an anon function like so: ``` package main import "fmt" func f(c chan func() (int, string)) { c <- (func() (int, string) { return 0, "s" }) } func main() { c := make(chan func() (int, string)) go f(c) y, z := (<-c)() fmt.Println(y) fmt.Println(z) } ``` Credit...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
As the other answers said, the colours themselves may pose a problem if the hues aren't distinguishable easily. The clearest solution to this is to combine the colours with a shape, so full-vision people can still scan quickly by colour but stopping to look for a second will also easily show the idea. Something like: ...
[Deuteranopia](http://www.color-blindness.com/deuteranopia-red-green-color-blindness/), or red-green colorblindness, is one of the most common forms of colorblindness. There are many other forms of [colorblindness](http://webaim.org/articles/visual/colorblind) that effect perception of red and green as well. Without a...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
[Deuteranopia](http://www.color-blindness.com/deuteranopia-red-green-color-blindness/), or red-green colorblindness, is one of the most common forms of colorblindness. There are many other forms of [colorblindness](http://webaim.org/articles/visual/colorblind) that effect perception of red and green as well. Without a...
It's better to only show an icon when there is a problem. Users will interpret the lack of an alert icon to mean that item is OK. A sea of green or icons that mean "OK" will make the problems harder to find because you are requiring the reader to differentiate between two possibilities for each line versus scanning t...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
[Deuteranopia](http://www.color-blindness.com/deuteranopia-red-green-color-blindness/), or red-green colorblindness, is one of the most common forms of colorblindness. There are many other forms of [colorblindness](http://webaim.org/articles/visual/colorblind) that effect perception of red and green as well. Without a...
In addition to what others said, here's a quick fix: [![enter image description here](https://i.stack.imgur.com/nquJq.jpg)](https://i.stack.imgur.com/nquJq.jpg) Use a combination of blue and orange. These can be discerned by the 3 most common cases.
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
As the other answers said, the colours themselves may pose a problem if the hues aren't distinguishable easily. The clearest solution to this is to combine the colours with a shape, so full-vision people can still scan quickly by colour but stopping to look for a second will also easily show the idea. Something like: ...
[WCAG guideline 1.4.1](http://www.w3.org/TR/WCAG20/#visual-audio-contrast) (Level A): > > 1.4.1 Use of Color: Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A) > > > So it is a clear violation of accessibi...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
[WCAG guideline 1.4.1](http://www.w3.org/TR/WCAG20/#visual-audio-contrast) (Level A): > > 1.4.1 Use of Color: Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A) > > > So it is a clear violation of accessibi...
It's better to only show an icon when there is a problem. Users will interpret the lack of an alert icon to mean that item is OK. A sea of green or icons that mean "OK" will make the problems harder to find because you are requiring the reader to differentiate between two possibilities for each line versus scanning t...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
[WCAG guideline 1.4.1](http://www.w3.org/TR/WCAG20/#visual-audio-contrast) (Level A): > > 1.4.1 Use of Color: Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A) > > > So it is a clear violation of accessibi...
In addition to what others said, here's a quick fix: [![enter image description here](https://i.stack.imgur.com/nquJq.jpg)](https://i.stack.imgur.com/nquJq.jpg) Use a combination of blue and orange. These can be discerned by the 3 most common cases.
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
As the other answers said, the colours themselves may pose a problem if the hues aren't distinguishable easily. The clearest solution to this is to combine the colours with a shape, so full-vision people can still scan quickly by colour but stopping to look for a second will also easily show the idea. Something like: ...
It's better to only show an icon when there is a problem. Users will interpret the lack of an alert icon to mean that item is OK. A sea of green or icons that mean "OK" will make the problems harder to find because you are requiring the reader to differentiate between two possibilities for each line versus scanning t...
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
As the other answers said, the colours themselves may pose a problem if the hues aren't distinguishable easily. The clearest solution to this is to combine the colours with a shape, so full-vision people can still scan quickly by colour but stopping to look for a second will also easily show the idea. Something like: ...
In addition to what others said, here's a quick fix: [![enter image description here](https://i.stack.imgur.com/nquJq.jpg)](https://i.stack.imgur.com/nquJq.jpg) Use a combination of blue and orange. These can be discerned by the 3 most common cases.
87,378
I'm looking at Google's web-based user interface for managing an enterprise's Chrome devices. Each device's status is represented by a colored circle (see images below). I would have thought that this would be violating accessibility principles - users suffering from color-blindness would not be able to distinguish t...
2015/11/26
[ "https://ux.stackexchange.com/questions/87378", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/9781/" ]
In addition to what others said, here's a quick fix: [![enter image description here](https://i.stack.imgur.com/nquJq.jpg)](https://i.stack.imgur.com/nquJq.jpg) Use a combination of blue and orange. These can be discerned by the 3 most common cases.
It's better to only show an icon when there is a problem. Users will interpret the lack of an alert icon to mean that item is OK. A sea of green or icons that mean "OK" will make the problems harder to find because you are requiring the reader to differentiate between two possibilities for each line versus scanning t...
216,449
As stated in the title i need to create a view. but I have certain restraints from the enterprise: most notably I must try to create this view without the use of another view. Since the enterprise is using SQLyog the MySQL version is 5.7.4, which is incompatible with subquery. the query is the following: ``` SELECT `...
2018/08/31
[ "https://dba.stackexchange.com/questions/216449", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/159777/" ]
The query itself is problematic. It's not using labels in the match pattern, which means it will have to perform an AllNodesScan to find both `n1` and `n2`. So that's happening twice per row in your CSV file. An EXPLAIN of the query would have showed you this in the query plan. You need to add labels into these match...
No, that is not normal. No recent processor & disk should take 12 hours to do anything with 89MB. Start with the basics. Is the process still consuming CPU? Is the disk active. What sort of read & write is it performing. Are the any messages in the DBMS or OS logs?
22,243,429
i was trying to run example from neo4j but was unable to so i think there's an error of packages not found can anyone please solve yhis 4 me. thanks in advance ``` D:\Practice>javac EmbeddedNeo4j.java>a.txt EmbeddedNeo4j.java:4: package org.neo4j.graphdb does not exist import org.neo4j.graphdb.Direction; ...
2014/03/07
[ "https://Stackoverflow.com/questions/22243429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3368829/" ]
Make sure to have `neo4j-kernel-<version>.jar` on your classpath (together with its transitive dependencies).
I guess you already figured it out but just in case, download the jar files from one of the links provided in this page <http://docs.neo4j.org/chunked/stable/tutorials-java-embedded-setup.html> and copy these jar files to the Java\jdk(version)\jre\lib\ext folder.
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
Interesting homework, but you still have to code yourself. Good thing is you have not told us which language you use, so I take it as a sign as you've decided to code yourself, which is good. --- My best try so far: Have 2 pointers for the sub string (range), one for the *start* (smaller index) of the range and one...
If I understand the problem correctly I think you need to do (language agnostic) ``` int partLen <- U.length; do { Vector subSets <- S.partition(partLen); foreach set I in subSets if I.isEqualTo(U) then return true; else partLen <- partLen + 1; } while (partLen <= S.leng...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
If I understand the problem correctly I think you need to do (language agnostic) ``` int partLen <- U.length; do { Vector subSets <- S.partition(partLen); foreach set I in subSets if I.isEqualTo(U) then return true; else partLen <- partLen + 1; } while (partLen <= S.leng...
Here is how I would do it (in pseudocode) ``` let counters[] be an array such that counters[j] = number of occurrences of character j, where j = 0 for 'A', j = 1 for 'B', etc. build counters[] by scanning the original string s let positions[j][] be an array listing the positions occupied by character j in the ori...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
Interesting homework, but you still have to code yourself. Good thing is you have not told us which language you use, so I take it as a sign as you've decided to code yourself, which is good. --- My best try so far: Have 2 pointers for the sub string (range), one for the *start* (smaller index) of the range and one...
Here's a simple algorithm which scans the array once, constantly checking if its currently-seen covering range is shorter than the previously seen covering ranges. For simplicity, I'm going to assume that we can map A, B, C, D, and E to the integers 0-4 so that we can easily reference an array. I haven't checked it th...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
Interesting homework, but you still have to code yourself. Good thing is you have not told us which language you use, so I take it as a sign as you've decided to code yourself, which is good. --- My best try so far: Have 2 pointers for the sub string (range), one for the *start* (smaller index) of the range and one...
Here is how I would do it (in pseudocode) ``` let counters[] be an array such that counters[j] = number of occurrences of character j, where j = 0 for 'A', j = 1 for 'B', etc. build counters[] by scanning the original string s let positions[j][] be an array listing the positions occupied by character j in the ori...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
Interesting homework, but you still have to code yourself. Good thing is you have not told us which language you use, so I take it as a sign as you've decided to code yourself, which is good. --- My best try so far: Have 2 pointers for the sub string (range), one for the *start* (smaller index) of the range and one...
First find different elements in the array, which is O(n) stuff. Then use sliding window approach to find minimum span, in which all these elements are present. You can see [here](http://tech-queries.blogspot.com/2010/12/finding-minimum-window-in-array-which.html) how to find the minimum window: <http://tech-queries.b...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
Here's a simple algorithm which scans the array once, constantly checking if its currently-seen covering range is shorter than the previously seen covering ranges. For simplicity, I'm going to assume that we can map A, B, C, D, and E to the integers 0-4 so that we can easily reference an array. I haven't checked it th...
Here is how I would do it (in pseudocode) ``` let counters[] be an array such that counters[j] = number of occurrences of character j, where j = 0 for 'A', j = 1 for 'B', etc. build counters[] by scanning the original string s let positions[j][] be an array listing the positions occupied by character j in the ori...
5,650,309
In the one dimensional array S , There might be any number of elements that belong to the set ``` U:{A,B,C,D,E} ``` and repetition is allowed. Example : ``` S = {E,B,D,C,A,D,A,E,E,D,B,B,A,C} ``` Question is: What is the most efficient way in which I can determine the shortest range/path that contains al...
2011/04/13
[ "https://Stackoverflow.com/questions/5650309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/628523/" ]
First find different elements in the array, which is O(n) stuff. Then use sliding window approach to find minimum span, in which all these elements are present. You can see [here](http://tech-queries.blogspot.com/2010/12/finding-minimum-window-in-array-which.html) how to find the minimum window: <http://tech-queries.b...
Here is how I would do it (in pseudocode) ``` let counters[] be an array such that counters[j] = number of occurrences of character j, where j = 0 for 'A', j = 1 for 'B', etc. build counters[] by scanning the original string s let positions[j][] be an array listing the positions occupied by character j in the ori...
25,281,044
So I have a jQuery plugin, which works very nicely. Inside this plugin, there is a HTML button assigned to the `togglePushy();` method, and it works nicely. However, I want to use this method from the Javascript console. The problem is if type `$.togglePushy();` it says it's undefined. How can I access it ? ``` $(f...
2014/08/13
[ "https://Stackoverflow.com/questions/25281044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3936427/" ]
Maybe you can change `togglePushy` to something like this: ``` $.togglePushy = function(){ body.toggleClass(pushyActiveClass); //toggle site overlay pushy.toggleClass(pushyClass); container.toggleClass(containerClass); push.toggleClass(pushClass); //css class to add pushy capability } ``` Now you sh...
I know not the best of the solution. But you can do this by keeping your functions outside the domaready event handler like following. ``` function togglePushy(){ body.toggleClass(pushyActiveClass); //toggle site overlay pushy.toggleClass(pushyClass); container.toggleClass(containerClass); push.toggleC...
25,281,044
So I have a jQuery plugin, which works very nicely. Inside this plugin, there is a HTML button assigned to the `togglePushy();` method, and it works nicely. However, I want to use this method from the Javascript console. The problem is if type `$.togglePushy();` it says it's undefined. How can I access it ? ``` $(f...
2014/08/13
[ "https://Stackoverflow.com/questions/25281044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3936427/" ]
Maybe you can change `togglePushy` to something like this: ``` $.togglePushy = function(){ body.toggleClass(pushyActiveClass); //toggle site overlay pushy.toggleClass(pushyClass); container.toggleClass(containerClass); push.toggleClass(pushClass); //css class to add pushy capability } ``` Now you sh...
Your togglePushy() function is defined only in the context (scope) of the jQuery closure (anonymous function). Define it in the global scope instead (elsewhere in the file and not as a "function parameter"). If you need variables from that scope, encapsulate them in a namespace (an object), or declare it as `window.to...
6,003,651
I try something like this below, but the complier warns me for this type is not applicable for the argument... I know it's not type safe, but any other way to do so? ``` public void addRow(List<? extends Car> list){ list.add( list.get(list.size()-1).getClass().newInstance() ); ``` }
2011/05/14
[ "https://Stackoverflow.com/questions/6003651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/753842/" ]
To see the problem, let's expand the problematic method as follows: ``` public <T extends Car> void addRow(List<T> list) throws InstantiationException, IllegalAccessException { T element = list.get(list.size() - 1); Class<T> clazz = element.getClass(); // Compilation Error Here! T newInstance = cla...
The problem is that the return type of `getClass()` is `Class<?>`. Java is not clever enough to infer the right type in this case - but you are, so use a cast.
6,003,651
I try something like this below, but the complier warns me for this type is not applicable for the argument... I know it's not type safe, but any other way to do so? ``` public void addRow(List<? extends Car> list){ list.add( list.get(list.size()-1).getClass().newInstance() ); ``` }
2011/05/14
[ "https://Stackoverflow.com/questions/6003651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/753842/" ]
To see the problem, let's expand the problematic method as follows: ``` public <T extends Car> void addRow(List<T> list) throws InstantiationException, IllegalAccessException { T element = list.get(list.size() - 1); Class<T> clazz = element.getClass(); // Compilation Error Here! T newInstance = cla...
Your method declaration calls for a List whose type is a class that extends Car. Yet when you call newInstance the compiler doesn't know what the sublcass is so it determines the class to be Car as well. Well you can't add a Car to a List that is expecting a subclass of Car. If it is acceptable for your List to store ...
2,269,727
``` $value = '100.00'; echo $value * 100/100; ``` Or should I be rounding incase there's a value such as '100.70'? I'm displaying this for a table that displays daily rates, the total value contains the digits so I assume the user won't have to really worry about decimal values...
2010/02/15
[ "https://Stackoverflow.com/questions/2269727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145190/" ]
Whether or not you should round is up to you. But for this consider using [`sprintf()`](http://www.php.net/manual/en/function.sprintf.php). ``` $value = '100.00'; echo sprintf("%.0f', $value); ``` is *much* better than some arithmetic hack to achieve the same thing. Also, multiplying then dividing by 100 is like mul...
``` echo $value * 100/100; ``` is equal to `$value * 1` kind sir Use [number format](http://php.net/manual/en/function.number-format.php) to format your numbers instead of doing some fancy arithmetic
2,269,727
``` $value = '100.00'; echo $value * 100/100; ``` Or should I be rounding incase there's a value such as '100.70'? I'm displaying this for a table that displays daily rates, the total value contains the digits so I assume the user won't have to really worry about decimal values...
2010/02/15
[ "https://Stackoverflow.com/questions/2269727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145190/" ]
``` echo $value * 100/100; ``` is equal to `$value * 1` kind sir Use [number format](http://php.net/manual/en/function.number-format.php) to format your numbers instead of doing some fancy arithmetic
Usually, people looking at columns of money want to see them all formatted the same way. With different values, the second expression would `100.01 100.1 100` instead of `100.01 100.10 100.00`. There are several ways to format numbers, including format\_number, sprintf(), and simple string manipulation.
2,269,727
``` $value = '100.00'; echo $value * 100/100; ``` Or should I be rounding incase there's a value such as '100.70'? I'm displaying this for a table that displays daily rates, the total value contains the digits so I assume the user won't have to really worry about decimal values...
2010/02/15
[ "https://Stackoverflow.com/questions/2269727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145190/" ]
Whether or not you should round is up to you. But for this consider using [`sprintf()`](http://www.php.net/manual/en/function.sprintf.php). ``` $value = '100.00'; echo sprintf("%.0f', $value); ``` is *much* better than some arithmetic hack to achieve the same thing. Also, multiplying then dividing by 100 is like mul...
Usually, people looking at columns of money want to see them all formatted the same way. With different values, the second expression would `100.01 100.1 100` instead of `100.01 100.10 100.00`. There are several ways to format numbers, including format\_number, sprintf(), and simple string manipulation.
39,050
It seems to me that Benjen may be a White Walker. His squad was ambushed. Some of his squad were turned into wights. Wights are only created by White Walkers. At the end of season 2 we can see that the White Walker not only shares his same chin strap goatee, but also his hair and hairline. I know this is all circ...
2013/08/06
[ "https://scifi.stackexchange.com/questions/39050", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16484/" ]
Based on the story evidence. He was most likely turned into a Wight not a White Walker. > > It is speculated that White Walkers are created from human babies, which is gossip provided in the book by the rangers as to why Craster sacrifices his male children to the White Walkers. You can read more about that in this ...
To add onto the correct [answer by @Justin Ethier](https://scifi.stackexchange.com/a/129746/58193) Benjen was neither wight nor White Walker but some other undead being saved from death/becoming a wight by the Children of the Forest. > > BRAN: Uncle Benjen. The last letter Jon wrote me said you had been lost beyond t...
39,050
It seems to me that Benjen may be a White Walker. His squad was ambushed. Some of his squad were turned into wights. Wights are only created by White Walkers. At the end of season 2 we can see that the White Walker not only shares his same chin strap goatee, but also his hair and hairline. I know this is all circ...
2013/08/06
[ "https://scifi.stackexchange.com/questions/39050", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16484/" ]
In [Season 6 Episode 6](http://www.hbo.com/game-of-thrones/episodes/6/56-56-blood-of-my-blood/synopsis.html) of Game of Thrones: > > Benjen Stark returns as a cloaked man on horseback (similar to Coldhands from the books) to save Bran and Meera. > > > In [summary](http://towerofthehand.com/blog/2016/05/30-rapid...
To add onto the correct [answer by @Justin Ethier](https://scifi.stackexchange.com/a/129746/58193) Benjen was neither wight nor White Walker but some other undead being saved from death/becoming a wight by the Children of the Forest. > > BRAN: Uncle Benjen. The last letter Jon wrote me said you had been lost beyond t...
57,010,688
When I am validating bean using `@Valid` annotation in `javax.validation`, for some objects I am getting `ConstraintViolationException` and for some I am getting a `MethodArgumentNotValidException`. I understand that, if I validate anything in `@ResponseBody` in the controller , it throws a `MethodArgumentNotValidExce...
2019/07/12
[ "https://Stackoverflow.com/questions/57010688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1340910/" ]
When you use @Valid, you are applying validation which is defined by you on your model class fields, while there are different types of validations, you can choose like @NotNull, @Max, @Min and so on, you will get the matching type. In general, all of these are parallel to **MethodArgumentNotValidException** which wil...
Take a look at this [article](https://reflectoring.io/bean-validation-with-spring-boot/). These exceptions are thrown under different situations when you mix spring's validation framework with bean validation.
57,010,688
When I am validating bean using `@Valid` annotation in `javax.validation`, for some objects I am getting `ConstraintViolationException` and for some I am getting a `MethodArgumentNotValidException`. I understand that, if I validate anything in `@ResponseBody` in the controller , it throws a `MethodArgumentNotValidExce...
2019/07/12
[ "https://Stackoverflow.com/questions/57010688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1340910/" ]
for a simple understanding, if validation happens at controller/service layer by using @Valid annotation, it generates MethodArgumentNotValidException, you can add handler for this and return the response accordingly, this class is part of spring framework and validation is performed by spring framework see sample belo...
Take a look at this [article](https://reflectoring.io/bean-validation-with-spring-boot/). These exceptions are thrown under different situations when you mix spring's validation framework with bean validation.
3,590,437
What type of variable that can contain 1,000,000,000(a decimal number) takes the most memory space? 1. int in C 2. string in C 3. string in Java(which uses unicode)
2010/08/28
[ "https://Stackoverflow.com/questions/3590437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429280/" ]
A Java String. Under the hood A Java String consists of an object with 3 fields, one of which points to a separate array object containing the characters. Plus of course, Java Strings are composed of 16 bit characters1. If you are worried about memory usage over all other criteria, don't use Java. But for most applica...
I honestly don't really want to answer this directly, so you can have looks over here: * <http://www.cplusplus.com/doc/tutorial/variables/> * <http://en.wikipedia.org/wiki/C_variable_types_and_declarations> * <http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html> Also it might be useful how to ...
3,590,437
What type of variable that can contain 1,000,000,000(a decimal number) takes the most memory space? 1. int in C 2. string in C 3. string in Java(which uses unicode)
2010/08/28
[ "https://Stackoverflow.com/questions/3590437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429280/" ]
A Java String. Under the hood A Java String consists of an object with 3 fields, one of which points to a separate array object containing the characters. Plus of course, Java Strings are composed of 16 bit characters1. If you are worried about memory usage over all other criteria, don't use Java. But for most applica...
The C standard doesn't state many storage requirements. As it is, you could have: * 256-bit C `int`s that take 32 bytes to store anything (see @nonnb's comment) * A wide C string (`wchar_t[]`) that uses UCS-4/UTF-32 characters (as all GNU implementations do, apparently) * A C implementation that uses 32-bit `char`s (w...
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
More than the abovementioned UML User guide, if you want a reference book then I would go for the The Unified Modeling Language Reference Manual (2nd Edition) by the same authors. This is the book they wrote to serve as reference guide. By the way, if what you are looking for is not a book but a quick cheat sheet or r...
[UML Bible](http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0764526049.html) is considered by many to be the ultimate reference - including a friend of mine who actually teaches UML. For a good introduction, Fowler's [UML Distilled](http://martinfowler.com/books.html#uml) is great as well. I hope this helps.
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
[UML Bible](http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0764526049.html) is considered by many to be the ultimate reference - including a friend of mine who actually teaches UML. For a good introduction, Fowler's [UML Distilled](http://martinfowler.com/books.html#uml) is great as well. I hope this helps.
I have many books (primarily on UML for embedded real-time systems, so possibly not relevant to you); none of which I would heartily recommend; the subject is too often treated very dryly. I do however recommend you check that any you consider cover at least UML 2.x not UML 1.1. Of all the resources I have used, the m...
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
[UML Bible](http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0764526049.html) is considered by many to be the ultimate reference - including a friend of mine who actually teaches UML. For a good introduction, Fowler's [UML Distilled](http://martinfowler.com/books.html#uml) is great as well. I hope this helps.
Object-oriented Systems analysis and design using UML By Bennett It is given as indicative reading on my degree course so may also be considered a text book. It has added to the initial understanding given to my by Fowler's UML Distilled.
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
More than the abovementioned UML User guide, if you want a reference book then I would go for the The Unified Modeling Language Reference Manual (2nd Edition) by the same authors. This is the book they wrote to serve as reference guide. By the way, if what you are looking for is not a book but a quick cheat sheet or r...
I recommend the [Unified Modeling Language User Guide, The (2nd Edition)](https://rads.stackoverflow.com/amzn/click/com/0321267974) for a complete reference, and it is written by some top dogs in the object modeling field. It is not set up as a tutorial with examples, et al, so it assumes you know reasonably well what ...
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
I recommend the [Unified Modeling Language User Guide, The (2nd Edition)](https://rads.stackoverflow.com/amzn/click/com/0321267974) for a complete reference, and it is written by some top dogs in the object modeling field. It is not set up as a tutorial with examples, et al, so it assumes you know reasonably well what ...
I have many books (primarily on UML for embedded real-time systems, so possibly not relevant to you); none of which I would heartily recommend; the subject is too often treated very dryly. I do however recommend you check that any you consider cover at least UML 2.x not UML 1.1. Of all the resources I have used, the m...
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
I recommend the [Unified Modeling Language User Guide, The (2nd Edition)](https://rads.stackoverflow.com/amzn/click/com/0321267974) for a complete reference, and it is written by some top dogs in the object modeling field. It is not set up as a tutorial with examples, et al, so it assumes you know reasonably well what ...
Object-oriented Systems analysis and design using UML By Bennett It is given as indicative reading on my degree course so may also be considered a text book. It has added to the initial understanding given to my by Fowler's UML Distilled.
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
More than the abovementioned UML User guide, if you want a reference book then I would go for the The Unified Modeling Language Reference Manual (2nd Edition) by the same authors. This is the book they wrote to serve as reference guide. By the way, if what you are looking for is not a book but a quick cheat sheet or r...
I have many books (primarily on UML for embedded real-time systems, so possibly not relevant to you); none of which I would heartily recommend; the subject is too often treated very dryly. I do however recommend you check that any you consider cover at least UML 2.x not UML 1.1. Of all the resources I have used, the m...
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
More than the abovementioned UML User guide, if you want a reference book then I would go for the The Unified Modeling Language Reference Manual (2nd Edition) by the same authors. This is the book they wrote to serve as reference guide. By the way, if what you are looking for is not a book but a quick cheat sheet or r...
Object-oriented Systems analysis and design using UML By Bennett It is given as indicative reading on my degree course so may also be considered a text book. It has added to the initial understanding given to my by Fowler's UML Distilled.
4,786,192
I have been a long time Firefox user and have recently been experimenting with using Google Chrome as my primary browser. Being somewhat irrelevant to the question, my primary reason for this experiment is because Chrome is *fast* and seems to be making good strides in terms of improvement. For day-to-day programming ...
2011/01/24
[ "https://Stackoverflow.com/questions/4786192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/315689/" ]
I have many books (primarily on UML for embedded real-time systems, so possibly not relevant to you); none of which I would heartily recommend; the subject is too often treated very dryly. I do however recommend you check that any you consider cover at least UML 2.x not UML 1.1. Of all the resources I have used, the m...
Object-oriented Systems analysis and design using UML By Bennett It is given as indicative reading on my degree course so may also be considered a text book. It has added to the initial understanding given to my by Fowler's UML Distilled.
37,002,628
This is stored in the settings file - ``` DATABASES = { 'default': { 'ENGINE' : 'django.db.backends.mysql', 'NAME' : 'db_test', 'USER' : 'root', 'PASSWORD': '', 'HOST' : 'localhost', 'PORT' : '', 'CONN_MAX_AGE': 45, 'OPTIONS' : { 'init_command': 'SET storage_engine...
2016/05/03
[ "https://Stackoverflow.com/questions/37002628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5945342/" ]
Have you tried migrations? It should work. ``` class Migration(migrations.Migration): ... operations = [ migrations.RunSQL('ALTER TABLE __your_table__ ENGINE=MYISAM;') ] ``` Source: <https://docs.djangoproject.com/en/1.9/ref/migration-operations/#runsql>
I think the best way is to do it manually. Remove ``` 'OPTIONS' : { 'init_command': 'SET storage_engine=INNODB', } ``` from your settings and perform ``` ALTER TABLE <tablename> ENGINE=MYISAM; ``` after Django create table for your model.
909,013
Let $f: X \to Y$ be a covering (proper, surjective, finite regular map) of smooth projective varieties of degree $d$. How one can show that in this case $f\_\* \mathcal{O}\_X$ is a locally free sheaf of rank $d$?
2014/08/25
[ "https://math.stackexchange.com/questions/909013", "https://math.stackexchange.com", "https://math.stackexchange.com/users/19446/" ]
The answer relies on the following incredibly general and simple result: > > Given a finite morphism of schemes $f:X\to Y$ with $Y$ locally noetherian, the sheaf $f\_\*\mathcal O\_X$ is locally trivial iff $f$ is flat. > > > The proof consists in quoting a result in commutative algebra: a module $M$ over a ring...
With your assumptions, $f$ is a flat morhism, and $H^1(X\_y,\mathscr O\_{X\_y})=0$ for all $y\in Y$. Then the theory of cohomology and base change says that $f\_\ast\mathscr O\_X$ is locally free. It is rank $d$ because $d=h^0(X\_y,\mathscr O\_{X\_y})$. If you want a precise statement, here it is: > > Suppose you h...
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
A good start to look for economic data are always the following three addresses: * [World Bank - Research Datasets](http://econ.worldbank.org/WBSITE/EXTERNAL/EXTDEC/EXTRESEARCH/0,,contentMDK:20388241~menuPK:665266~pagePK:64165401~piPK:64165026~theSitePK:469382,00.html) * [IMF - Data and Statistics](http://www.imf.org/...
<http://www.data.gov/> probably has something you can use. In their catalog of raw data you can set your criteria for the data and find what you're looking for <http://www.data.gov/catalog/raw>
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
Collection of [over 800 datasets in ARFF format](http://tunedit.org/search?q=arff) understood by Weka and other data analysis packages, gathered in TunedIT.org Repository.
[Another collection of datasets](http://sites.google.com/site/munaga71/Home/datasetlinks).
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
The `datasets` package is included with base R. Run this command to see a full list: ``` library(help="datasets") ``` Beyond that, there are many packages that can pull data, and many others that contain important data. Of these, you may want to start by looking at the [**HistData**](http://cran.r-project.org/web/pa...
You could look on [this post on FlowingData](http://flowingdata.com/2009/10/01/30-resources-to-find-the-data-you-need/ "30 resources to find the data you need")
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
<http://www.data.gov.uk/data> Recently setup by Tim Berners-Lee Obviously UK based data, but that shouldn't matter. Covers everything from abandoned cars to school absenteeism to agricultural price indexes
I've seen on your other questions that you are apparently interested in data visualization. Have then a look at [many eyes](http://manyeyes.alphaworks.ibm.com/manyeyes/) project (form IBM) and the sample [data sets](http://manyeyes.alphaworks.ibm.com/manyeyes/datasets).
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
<http://www.data.gov.uk/data> Recently setup by Tim Berners-Lee Obviously UK based data, but that shouldn't matter. Covers everything from abandoned cars to school absenteeism to agricultural price indexes
<http://www.data.gov/> probably has something you can use. In their catalog of raw data you can set your criteria for the data and find what you're looking for <http://www.data.gov/catalog/raw>
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
Collection of [over 800 datasets in ARFF format](http://tunedit.org/search?q=arff) understood by Weka and other data analysis packages, gathered in TunedIT.org Repository.
Here's an R package with several agricultural datasets from books and papers. Example analyses included: [agridat](http://cran.r-project.org/web/packages/agridat/index.html)
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
<http://www.data.gov.uk/data> Recently setup by Tim Berners-Lee Obviously UK based data, but that shouldn't matter. Covers everything from abandoned cars to school absenteeism to agricultural price indexes
Similar to data.gov, but european centered is eurostat <http://epp.eurostat.ec.europa.eu/portal/page/portal/statistics/search_database> and there is a chinese statistics departement, too, as mentioned by [Wildebeests](http://www.wildebeests.net/2010/01/30/mathematica-work-flows-retrieving-processing-and-presenting-da...
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
The `datasets` package is included with base R. Run this command to see a full list: ``` library(help="datasets") ``` Beyond that, there are many packages that can pull data, and many others that contain important data. Of these, you may want to start by looking at the [**HistData**](http://cran.r-project.org/web/pa...
Here's an R package with several agricultural datasets from books and papers. Example analyses included: [agridat](http://cran.r-project.org/web/packages/agridat/index.html)
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
Have you considered [Stack Overflow Data Dumps](https://blog.stackoverflow.com/2009/06/stack-overflow-creative-commons-data-dump/)? You are already familiar with what the data represents i.e. the business logic it tracks
Collection of [over 800 datasets in ARFF format](http://tunedit.org/search?q=arff) understood by Weka and other data analysis packages, gathered in TunedIT.org Repository.
2,252,148
How can I implement a large relational database schema on a key value store? The following are the requirements: 1) uses no stored procedures or special database vendor specific features 2) Uses indexes 3) Uses joins 4) Many complex types in tables (VARCHAR, INT, BLOB, etc) 5) Billions of records 6) Full text se...
2010/02/12
[ "https://Stackoverflow.com/questions/2252148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190822/" ]
A broad selection on the Web. For instance, here's a massive directory of [sports databases](http://www.databasesports.com/) (all providing the data free of charge, at least that's my experience). In that directory is databaseBaseball.com, which contains among other things, [complete datasets](http://www.databasebaseba...
[UC Irvine Machine Learning Repository](http://archive.ics.uci.edu/ml/) has currently 190 data sets. > > The UCI Machine Learning Repository is > a collection of databases, domain > theories, and data generators that are > used by the machine learning community > for the empirical analysis of machine > learning ...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
TypeOrm removed `ormconfig.json` support in version [0.3.0](https://typeorm.io/changelog#030httpsgithubcomtypeormtypeormpull8616-2022-03-17). You should use new syntax - create `ormconfig.ts` and specify options for you database, for example: ```js export const connectionSource = new DataSource({ migrationsTableNa...
Just figure out that you have to define the path to the file where your Datasource is defined. In my case: `yarn typeorm migration:run -d dist/datasources/datasource.js`
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
Just figure out that you have to define the path to the file where your Datasource is defined. In my case: `yarn typeorm migration:run -d dist/datasources/datasource.js`
Please don't forget `--` > > If you need to pass parameter with dash to npm script, you will need to add them after --. For example, if you need to generate, the command is like this: > > > > ``` > npm run typeorm migration:generate -- -n migrationNameHere > > ``` > > Docs [here](https://typeorm.io/using-cli#i...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
Just figure out that you have to define the path to the file where your Datasource is defined. In my case: `yarn typeorm migration:run -d dist/datasources/datasource.js`
Use the App - Datasource method to initialize your connection and it's quit easier from there ``` export const AppDataSource = new DataSource({ type: "postgres", host: "localhost", port: 5432, username: "postgres", password: "ROOT", database: "userLog", synchronize: true, logging: true,...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
Just figure out that you have to define the path to the file where your Datasource is defined. In my case: `yarn typeorm migration:run -d dist/datasources/datasource.js`
with latest typescript if you are using cli setup as per typeorm [setup](https://typeorm.io/using-cli#installing-cli) then following package.json script will work ``` "scripts": { "typeorm": "typeorm-ts-node-commonjs -d ./src/datasources/PostgresDatasource.ts", } ``` Run `npm run typeorm migration:generate src/m...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
TypeOrm removed `ormconfig.json` support in version [0.3.0](https://typeorm.io/changelog#030httpsgithubcomtypeormtypeormpull8616-2022-03-17). You should use new syntax - create `ormconfig.ts` and specify options for you database, for example: ```js export const connectionSource = new DataSource({ migrationsTableNa...
Please don't forget `--` > > If you need to pass parameter with dash to npm script, you will need to add them after --. For example, if you need to generate, the command is like this: > > > > ``` > npm run typeorm migration:generate -- -n migrationNameHere > > ``` > > Docs [here](https://typeorm.io/using-cli#i...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
TypeOrm removed `ormconfig.json` support in version [0.3.0](https://typeorm.io/changelog#030httpsgithubcomtypeormtypeormpull8616-2022-03-17). You should use new syntax - create `ormconfig.ts` and specify options for you database, for example: ```js export const connectionSource = new DataSource({ migrationsTableNa...
Use the App - Datasource method to initialize your connection and it's quit easier from there ``` export const AppDataSource = new DataSource({ type: "postgres", host: "localhost", port: 5432, username: "postgres", password: "ROOT", database: "userLog", synchronize: true, logging: true,...
71,803,522
I'm just playing with some pure Ruby to gain better understanding and trying to find the primes of a number, without just using the Prime gem, which I'm aware of but I wrote this all for understanding, not to solve a problem per se. I've written the following code: ```rb class LargestPrimeFactor # goal: find larges...
2022/04/08
[ "https://Stackoverflow.com/questions/71803522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2638952/" ]
TypeOrm removed `ormconfig.json` support in version [0.3.0](https://typeorm.io/changelog#030httpsgithubcomtypeormtypeormpull8616-2022-03-17). You should use new syntax - create `ormconfig.ts` and specify options for you database, for example: ```js export const connectionSource = new DataSource({ migrationsTableNa...
with latest typescript if you are using cli setup as per typeorm [setup](https://typeorm.io/using-cli#installing-cli) then following package.json script will work ``` "scripts": { "typeorm": "typeorm-ts-node-commonjs -d ./src/datasources/PostgresDatasource.ts", } ``` Run `npm run typeorm migration:generate src/m...
16,820,794
I almost have similar steps for two different scenario. Only one step is different. Is there any preferred way to reuse steps. ``` @no-database-cleaner Feature: Managing users parent child relationships In order to use Login portal I want to create parent child relationships Scenario: Creating a ch...
2013/05/29
[ "https://Stackoverflow.com/questions/16820794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/588324/" ]
Cucumber side : you should use a Scenario Outline ``` Scenario Outline: Creating a child user with new ar_id Given I am on the homepage ... Then I should see "Child User is successfully created." And appropriate records should get created for the child user for <my_id> Scenarios: | my_id | | default abc...
You should use `background` to reuse all common code that appears in `scenarios` within the `feature`. For a quick example, you have ``` Then I should see "abc@company1.com" message on page When I follow "All Child Users" Then I should see "Add Sub Child" When I click "Add Sub Child" etc....... ``` in both scenario...
41,647
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
2008/09/03
[ "https://Stackoverflow.com/questions/41647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
What you are seeing is a UTF-8 Byte Order Mark: > > The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 characters  in most text editors and web browsers not prepared to handle UTF-8. > > > [Byte Order Mark on Wikipedia](http://en.wikipedia.org/wiki/Byte_Order_Mark)...
> > I'd also be curious to see what > happens if you copy the code out of > the include and just run it by itself. > > > Mark: this is on a shared hosting solution, so I can not get shell access to the file. However, as you can see [here](http://driveefficiently.com/include.inc), there are no characters that sho...
41,647
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
2008/09/03
[ "https://Stackoverflow.com/questions/41647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
What you are seeing is a UTF-8 Byte Order Mark: > > The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 characters  in most text editors and web browsers not prepared to handle UTF-8. > > > [Byte Order Mark on Wikipedia](http://en.wikipedia.org/wiki/Byte_Order_Mark)...
Character 3F actually *is* the question mark, it isn't just displaying as one. I get the same results as Thomas, no question mark showing up. In theory it could be some problem with a web proxy but I am inclined to suspect a stray question mark in your PHP markup...which perhaps you have fixed by now so we don't see ...
41,647
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
2008/09/03
[ "https://Stackoverflow.com/questions/41647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
It doesn't show up on the rendered page in Firefox or IE but you can see the funny character when you View Source in IE ![enter image description here](https://i.stack.imgur.com/cyPAq.png) Is this on a Linux machine? Could you do find & replace with vim or sed to see if you can get rid of the 3F that way? If it's o...
> > I'd also be curious to see what > happens if you copy the code out of > the include and just run it by itself. > > > Mark: this is on a shared hosting solution, so I can not get shell access to the file. However, as you can see [here](http://driveefficiently.com/include.inc), there are no characters that sho...
41,647
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
2008/09/03
[ "https://Stackoverflow.com/questions/41647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
Your web server (or your text editor) apparently includes a [BOM](http://en.wikipedia.org/wiki/Byte_order_mark) into the document. I don't see the rogue character in my browser except when I set the site's encoding explicitly to Latin-1. Then, I see two (!) UTF-8 BOMs. /EDIT: From the fact that there are *two* BOMs I ...
Character 3F actually *is* the question mark, it isn't just displaying as one. I get the same results as Thomas, no question mark showing up. In theory it could be some problem with a web proxy but I am inclined to suspect a stray question mark in your PHP markup...which perhaps you have fixed by now so we don't see ...
41,647
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
2008/09/03
[ "https://Stackoverflow.com/questions/41647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
What you are seeing is a UTF-8 Byte Order Mark: > > The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 characters  in most text editors and web browsers not prepared to handle UTF-8. > > > [Byte Order Mark on Wikipedia](http://en.wikipedia.org/wiki/Byte_Order_Mark)...
It doesn't show up on the rendered page in Firefox or IE but you can see the funny character when you View Source in IE ![enter image description here](https://i.stack.imgur.com/cyPAq.png) Is this on a Linux machine? Could you do find & replace with vim or sed to see if you can get rid of the 3F that way? If it's o...