FAQ Database Discussion Community


Which element to use for font icons in bootstrap navbar

twitter-bootstrap,twitter-bootstrap-3,font-awesome,glyphicons,font-awesome-4.0.0
Bootstrap 3 navbar uses glyphicons and Font Awesome icons as shown in html below. Bootstrap manual recommends to use span element: <span class="fa fa-pencil-square-o" aria-hidden="true"></span> FontAwesome web page recommends to use i element: <i class="fa fa-pencil-square-o" aria-hidden="true"></i> Using i element makes icon bigger than using span . Bigger looks better....

Write a complex Linq2SQL query

c#,asp.net-mvc,linq,linq-to-sql
I have Following Data Category CategoryName CategoryID Product ProductID ProductName CategoryID Item ItemID ItemName ProductID What will be the query so that i will get multiple list i.e. ListOfCategory contains CategoryName and ListOfProduct<> ListOfProduct contains ProductName and ListOfItems<> ListOfItems<> Contains ItemName and ItemID var cats = (from g in CMP.tblCategories...

Parameter for like count with facebook api V2.3

ios,objective-c,facebook-graph-api
I am using this line of code for getting count of likes on facebook post NSString *postId = @"1234567890_1234567890"; NSMutableDictionary* photosParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:postId,@"ObjectId",nil]; NSString * str = (NSString *) [[[FBSDKGraphRequest alloc] initWithGraphPath:@"/{object-id}/likes" parameters:photosParams HTTPMethod:@"GET"] startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { if ([error.userInfo[FBSDKGraphRequestErrorGraphErrorCode] isEqual:@200]) {...

Concatenate a number to url everytime I click on the button?

javascript,string,numbers,concatenation,concat
How do I concatenate a number to string everytime I click on the button? If I log cConcate variable you will see that the first value is right but on subsequent clicks the url refuses to update. var tNumber = 1; var sSting = "http://www.test.com/"; var cConcate = sSting +...

Use eStorage in EMF

java,eclipse-emf,emf
In my EObject I have the field eStorage, wich contains data, I want to use. Is there a possibility to read out the eStorage? I tried the code below but it doesn't work: doIt(EObject object) { object.getEStorage; // use the eStorage... } ...

How to get existing user data from one datastore to newly connected datastore in Openam

openam,opendj,adlds
I am using Openam12 , I have following scenario: install openam12 with with embedded or external openDJ. add some users/groups on this data store. Add new AD LDS datastore, using ADAM configuration load openam schema to AD LDS. I can view existing users/groups in AD LDS reflect in in my...

Accessing inner scope variable values on the page with CasperJS

javascript,variables,casperjs
I'm new to CasperJS and trying to get some JS code from a website. Let's say I got this code: <html> ... <script type="text/javascript"> var a = "true"; function abc(){ var b = "someValue"; b = b + " and other value"; } </script> ... ... </html> I'm able to...

How can I create a function for the color in decreasing order

php,css,arrays,colors
I am creating a functionality to create the image like this Image link I mean that I want to display the color like 0 %-1 % green to light green 1%-3% yellow to light yellow 3%-5% orange to light orange 5% - 6 red to dark red Currently, I think...

Take data from Enum to show on UIPickerView Swift

ios,swift,enums,uipickerview
I am creating a simple View where there is a UIPickerView and I want to display the choices on the PickerView from an enum. I have created an enum of possible drinks enum drink{ case coffee case tea case cola case water } I was wondering how it would be...

IntelliJ Idea: how to expose classes, interfaces, annotations in developed plugins

java,intellij-idea,intellij-plugin
I have created a plugin for IntelliJ Idea. In the plugin I have defined an annotation I want to use in my projects, but it doesn't seem to be accessible. How should I specify in the plugin.xml file the packages I want to expose?

Sqlite order by, AaBbCc

sqlite,sqlite3,order
I have been trying to get sqlite to order a set of entries by name in the following order AaBbCcDd......Zz but the closest I've gotten is using COLLATE NOCASE to get a case insensitive sort. The entries I have are Addy|2000-01-22T16:06:14.155Z alice|2000-01-22T16:06:20.514Z billyRay|2000-01-22T16:06:36.175Z Bobby|2000-01-22T16:06:26.868Z claus|2000-01-22T16:06:52.531Z CoffinLLC|2000-01-22T15:33:11.235Z Default|2000-01-22T15:55:12.168Z I have tried...

how to get selectd code and selected name value from spinner in android

android
this is my Asynk task am getting data from server and calling in Oncreate method class download extends AsyncTask<Void, Void, Void> { String result; @Override protected void onPreExecute() { // TODO Auto-generated method stub super.onPreExecute(); pDialog = new ProgressDialog(RDistributor.this); pDialog.setTitle("CheckUser Connection"); pDialog.setMessage("Please wait..."); pDialog.show(); } @Override protected Void doInBackground(Void... params)...

Mysql Indent columns

mysql
This is my table: select * from Vulnerabilities;...

How to marshall large java objects to xml without heap error?

java,xml,jaxb,marshalling
Currently I am using JAXB marshaller to marshall the lasrge java object and it is working but when i recive the large java object application is throwing the OutOfMemoryError: heap space error. Can some one let me know how to marshall large java object to xml without heap error. StringWriter...

How to update a field in a immutable object

java,oop,immutability
Supposing the following class: @Immutable public final MyMessageClass { private String message; private Date dateLastChange; private String identifier; public MyClass(final String message){ this.message = message; dataLastChange = new Date(); } public Date lastChange() { return new Date(dateLastChange.getTime()); } public String messageValue(){ return message; } } Once we have built an...

How does method reference casting work?

java,casting,lambda,java-8,method-reference
public class Main { interface Capitalizer { public String capitalize(String name); } public String toUpperCase() { return "ALLCAPS"; } public static void main(String[] args) { Capitalizer c = String::toUpperCase; //This works c = Main::toUpperCase; //Compile error } } Both are instance methods with same signature. Why does one work and...

code blocks not compiling empty c file in linux lite

c,linux,gcc,codeblocks,permission-denied
I am using linux Lite. I have installed code Blocks. When i am creating any new project then it is working correctly. it compiling codes. But When any empty c file is creating and trying to compile then it is not working.Showing message that permission denied. I have checked the...

Debuging problems - Values are hidden

ios,objective-c,debugging,nscoder,nsarchiving
I need some ideea about what can be he cause of my problem . I have a source code and i want to make some debug on it , but i can't see the variables. For example : NSArray *oldSavedArray = [NSKeyedUnarchiver unarchiveObjectWithData:dataRepresentingSavedArray]; NSLog(@"The content of oldSavedArray is%@",oldSavedArray); and i...

Dummy web application for penetetration testing ethical hacking

web-applications,owasp,hacking
i am searching web applications, on which I can try my pentesting skills for my Thesis. Maybe OWASP offers some, but I cant find any. Does someone have an idea? Greets...

How to enforce constraints in `flask-admin`?

python,flask,flask-sqlalchemy,flask-admin
We're using http://flask-admin.readthedocs.org/ for a quick admin interface. Our model has constraints defined as follows: __table_args__ = ( db.UniqueConstraint(user_id, role, domain_id), db.UniqueConstraint(user_id, role, customer_id), ) When saving a record that violates a constraint while in debug mode, the app stops with a traceback. If not in debug mode, it reports...

What is the best way to save JNIEnv*

android,android-ndk,jni,jnienv
I have an Android project with JNI. In the CPP file which implements a listener class, there is a callback x() . When x() function is called, I want to call another function in a java class. However, in order to invoke that java function, I need to access JNIEnv*....

Objective-c Core Data [closed]

ios,objective-c,core-data
I'm trying to make an application and that have an login screen.When user press login I'm posting username and password to my webservice.After That I'm sending tokens,name and adress informations.I need the keep this informations in device then fetch them in another views.How can I do that ? Do you...

Can Intellij / Android Studio fold comments?

intellij-idea,android-studio
I have this commented out piece of code in intellij: As you can see, there is no possibility to fold comments here. However, the same commented block in Webstorm can be collapse: Is there any way to configure comments collapsing in intellij/Android Studio?...

Vertical black bars in nav buttons

html,nav
Taking an ultra-basic HTML class and just need to submit this project so I don't fail the class. On my simply ugly-ass menu I get a vertical black bar inside my buttons to the left of the text on every button except "Home". Thank you for your help stay cool...

Polymer using core-selector - how to set selected value with array

javascript,html,polymer,web-component
I am using polymer 0.5 and specificly the core-selector element: <core-selector multi valueattr="label" id="specialisms" layout horizontal wrap around-justified> <div class="item core-selected" label="label1" active>Boo</div> <div class="item core-selected" label="label1" active>Baa</div> <div class="item" label="label1">Cow</div> </core-selector> How can i give multiple selected values with an array? What is the best way of doing this?...

SQLAlchemy orm styles, how to make special drive to your connection string

python,sqlalchemy,driver,pypy,pypyodbc
I use pypy, pypyodbc and SQLAlchemy. I have problem of odbc connections. I use: engine = create_engine('mssql+pyodbc://dbuser:[email protected]/dbname', echo = False) Session = sessionmaker(bind=engine) style try to connect the database. The error is: C:\pypy\site-packages\sqlalchemy\connectors\pypyodbc.py:82: SAWarning: No driver name specified; this is expected by PyODBC when using DSN-less connections "No driver name...

Why my “pull down to load data” stuck at page 2 without loading anymore data

ios,uitableview,swift,uiscrollview,infinite-scroll
Is there a theory about reloading new data by appending old data with new from json?I am having problem with solving that case.I used this infinite uitableview to reload more data from my api json string.My Api give me back the results base on page no. My json header include...

Using shim config with almond

javascript,requirejs,amd,almond
I am trying to shim certain modules for usage with almond like so: <script> requirejs.config({ shim: { 'jQuery': { exports: 'jQuery' }, //etc. </script> as certain scripts will already be included. However, this code: require(['jQuery', function($) { }); results in "undefined missing jQuery". If I shim jQuery like this: define('jQuery',...

Entity Framework inner join

c#,entity-framework,join
I have two tables something like this: Customers: Email username Products: Username Product I'd like to fill a class with username, product, and email. This is what I have so var res = from H in db.Products join C in db.customers on H.Username equals C.Username where C.Username == H.Username select...

Can ng-repeat limitTo be applied to repeat on json instead of array?

javascript,arrays,json,angularjs,angularjs-ng-repeat
I am doing an ng-repeat on a json object based on it's keys. Now I am able to limit the no of repeated items to say 5 using ng-repeat="item in array|limitTo:5" for an array object. But when I try doing ng-repeat="key in json|limitTo: 5" its not succeeding in restricting the...

How to split a number into its digits in Javascript?

javascript
I want to Split a number into its digit (for example 4563 to 4 , 5 , 6 , 3 ) then addiction this digits. (for example: 4+5+6+3=18) I can write code for 3 digit or 2 digit and ... numbers seperately but I cant write a global code for...

Don't show default selected option in dropdown list

javascript,html
Is there a way to not show the first option inside the dropdown list of a HTML select tag? They only thing I know of is to disable it from being clicked but I want it to not be shown inside the dropdown, like this : <select class="archive" onChange="window.location.href=this.value"> <option...

Setting an example answer in a text input field

python,django,django-forms
I'm trying to set a default value in a text input field which gives the user an example of what to enter. This should be greyed-out and should disappear as soon as they start typing. I've tried setting an initial value but this isn't automatically replaced when the user starts...

first_or_initialize calling block even though row is found

ruby-on-rails,ruby,activerecord
In one of my models, I'm calling puts where(field: value).first where(field: value).first_or_initialize.tap do |row| # . . . Actual creation and saving omitted end I've run it a few times just to test it, and the block keeps being run even though I can see plainly that it shouldn't be...

Regex to extract Job Experience from a text

java,regex
I am trying to create a general regex to extract job experience from a text. Consider the following examples and their expected outputs. 1)String string1= "My work experience is 2 years" Output = "2 years" 2) String string2 = "My work experience is 6 months" Output = "6 months" I...

How to get data from server when i enter something in search box like auto search?

android,search,server,searchview
i trying to implement auto search mechanism in android like google. Here when i enter some words then display related search results in list view. For example i entered 3 letters then display related search results from server, again i will add another letter to previous 3 letters then automatically...

Use promises within service but NOT returning a promise

javascript,angularjs,promise
So I am creating a service which sends a message to the backend to check whether a particular email address is already on the database. userDB.emailExists = function() { var returnVal; $http.get('?backend=users&email=myemail%40mydomain.com') .success(function(data) { returnVal = data.count ? true : false; }) .error(function(data) { /* TODO error handling */ });...

How do i remove :: command in vim

vim
:: is used to execute command in command line mode. I wanna remove that. I tried the way below. map! :: <nop> unmap! :: cmap :: <nop> cnoremap :: <nop> cunmap :: But nothing works. How do I remove that :: command? plz help me. ~(._.)~...

Perl and PostgreSQL escaping $

perl,postgresql
I have an SQL statement executed from perl. $my_sql = qq ( SELECT 1 AS .... ); Then I do my $sm = $dbh->prepare($my_sql); $sm->execute; The issue is that my SQL has regex like this in many places. value ~ '^[1-9][0-9]?/[1-9][0-9]?/[1-9][0-9]{3}$': So I get errors when I execute the perl...

Heap dump on JRE 6 (Windows) without JDK

java,memory-leaks,heap,dump
Is there a way to create a heap dump on a remote machine without JDK installed? I can't change the installation / settings and it's running on Windows. So I have pnly access to commandline tools. Problem is that a Java app on a remote machine freezes (no out of...

Object not passed to jQuery Dialog OnSubmit handler

javascript,jquery,jquery-ui
I have the following HTML: <div id="referenceResolverDialog" title="Resolve IDs"> <p>Please fill in a comma separated list of IDs.</p> <form> <fieldset> <textarea name="referenceResolverTextArea" id="referenceResolverTextArea" rows="6" cols="54"></textarea> </fieldset> </form> </div> I created the jQuery dialog as follow: var configParams = { // some config properties textAreaSelector: '#referenceResolverTextArea', // some other config properties...

gdi+ PrivateFontCollection AddFontFile always returns status with “InvalidParameter”

c++,fonts,gdi+,win32gui,typeface
every one, I'm using GDI+ to rendering text with my own typeface, but I always get a error status InvalidParameter when using member function AddFontFile(WCHAR*) of PrivateFontCollection to load my font file, here is my code: PrivateFontCollection m_font_collection; ... // initialize window GdiplusStartup(&gdi_token, &gdi_startup_input, NULL); // here the result always...

R: How to visualize change in binary/categorical data over time

r,plot,visualization
>dput(data) structure(list(ID = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3), Dx = c(1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1), Month = c(0, 6, 12, 18, 24, 0, 6, 12, 18, 24, 0, 6, 12,...

How to redirect in “NEW” tab with meta

html,url-redirection,meta
Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code <meta http-equiv="refresh" content="5;URL=http://www.example.com > but it redirects it in same page. And if i add the following code after the url then also nothing happens target = "_blank" Please...

bat-Script: execute command, reopen cmd and execute another command

windows,batch-file,cmd
Good morning everyone, i try to write a script to do the following example (all in cmd): execute command wait for the command to be finished close the cmd window and open a new one execute another command exit My problem is at point 2 and 3. exit is not...

SPARQL: union on dbpedia changes birthdate

union,sparql,dbpedia
I'm facing a strange behavior by using "union" on the endpoint http://de.dbpedia.org/sparql. By using SELECT distinct * WHERE { { ?name dcterms:subject category-de:Haus_Liechtenstein. ?name rdf:type foaf:Person. ?name <http://dbpedia.org/ontology/birthDate> ?birthdate. Optional {?name dbpedia-owl:deathDate ?deathDate.} Optional {?name <http://de.dbpedia.org/property/gnd> ?gnd.} } filter (!bound(?deathDate)) } Order BY ASC (?birthdate) the birthdate of "Marie Kinsky"...

Add view by sliding in from left

android,android-animation,android-view
I want to add a view to a fragment via an animation. I want the view to appear by sliding in from the left of the screen and exit by sliding out the same way. I'm not able to get this to work. When the fragment appears, the view is...

Nice way of factory method pattern with inheritance

java,oop,design-patterns,factory,factory-pattern
Suppose I have following class hierarchy: class abstract Parent{} class FirstChild extends Parent {} class SecondChild extends Parent {} And I'd like to create DTO objects from each child: class abstract ParentDTO {} class FirstChildDTO extends ParentDTO{} class SecondChildDTO extends ParentDTO{} I think I need a factory method something like...

Moving fill background to the bottom after saving as jpg

matlab-figure
When I use fill or viscircles functions to plot circles with background to the plot, in figure it appears on the top of the plot, as it was intended, but after saving as jpg or png, the background moves to the bottom of the plot and is not visible anymore....

Spring Boot Multi Project Maven Application Context Error

java,eclipse,spring,maven,spring-boot
I'm struggling with a multi-project setup with Maven. Everything uses Spring boot and Annotations. I'm using one project for the data access. The configuration file is like this: @Configuration @EnableJpaRepositories(basePackages = { "de.bvk.infra.g_portal.dataaccess.Repository" }) @EntityScan public class DataConfiguration { } The Repositories are used in Tests with @Autowired. This is...

Use Spine in Cocos2dx

cocos2d-x-3.0
In cocos2dx, I use the class skeletonAnimation to create the skeleton animation which uses the resources exported by spine. We know the class skeletonAnimation is the subclass of node not is sprite. How to do to make the skeleton animation flip the node as it like to use the method...

ExtJs Load diferent data from one store to multiple selects

javascript,extjs,combobox,extjs4.2
I have 1 store wich serves me the values from a UD field wich are the options for the comboxes. Ext.define('freetextOrder.model.comboBoxValues', { extend: 'Ext.data.Model', fields: [ {name: 'name', type: 'string'}, {name: 'unit', type: 'string'} {name: 'comboxid', type: 'int'} ] }); now i have to load foreach comboxid an xtype: 'combobox'...

Core animation returns layer to the original position when label's text is changed

ios,objective-c,core-animation
I've got simple animation which moves my view's layer and remains in it's final state. CGPoint originalPosition = self.redSquare.layer.position; self.redSquare.layer.position = CGPointMake(100, 100); CABasicAnimation *animation = [[CABasicAnimation alloc]init]; animation.keyPath = @"position.x"; animation.fromValue = @(originalPosition.x); animation.toValue = @250; animation.duration = 2; [self.redSquare.layer addAnimation:animation forKey:@"basic"]; self.redSquare.layer.position = CGPointMake(250, originalPosition.y); But when I...

How to get id as key and email as its value from multidimensional array?

php,arrays,multidimensional-array
I have multi-dimensional array like below $records = array( array( 'id' => 11, 'first_name' => 'John', 'last_name' => 'Doe', 'email' => '[email protected]' ), array( 'id' => 12, 'first_name' => 'Sally', 'last_name' => 'Smith', 'email' => '[email protected]' ), array( 'id' => 13, 'first_name' => 'Jane', 'last_name' => 'Jones', 'email' => '[email protected]'...

addEventListener does not work on dynamically created button

javascript
I'm creating 3 buttons dynamically. Now I need to add an onclick event. How can I make the onclick work? var btns=''; var category = ["fur_", "fts_", "fas_"]; for(i = 1; i < category.length; i++){ btns +='<button type="button" class='+category[i]+' id= "myBtn'+i+'">Button</button>'; } document.getElementById('div').innerHTML = btns; var button = document.getElementById('myBtn1'); button.addEventListener('click',...

Reading and learning Spark API?

apache-spark
I am learning Spark by example, but I don't know the good way to understand API. For instance, the very classic word count example: val input = sc.textFile("README.md") val words = input.flatMap(x => x.split(" ")) val result = words.map(x => (x, 1)).reduceByKey((x, y) => x + y) When I read...

Git Branch Delete Warning - What to Do?

git,merge,delete,branch
I'm new to Git and I am using it for the first time as I develop a Flex application using IntelliJ 14. I am developing on my MacBook and have a local repository. I have created a remote repository on our Fileserver, which is backed up nightly, which I push...

Directive inside directive. Compile is not working?

angularjs,angularjs-directive
I am still rather new to angular JS, and wanted to learn about directives. I want to make a nested directives, kind like menu such as this: <myDirective>Hello</myDirective> Pretty simple, and I've put it like this with $compile: .directive('myDirective', function($compile) { return { restrict: 'E', transclude: true, template: '<dialog2><div ng-transclude></div></dialog2>',...

Android Gradle sync exception with the Smooth Progress Bar project

java,android,android-studio,gradle
I'm trying to add this library but when I try to sync Gradle the compiler give me this error: Error:(6, 13) Failed to resolve: com.github.castorflex.smoothprogressbar:library:1.1.0 And if that matter to solve this problem, I'm having this other problem in my project posted in stack overflow. This is how it looks...

Cursor returning 0

android,mysql,cursor
I have a function where I want to get the sum of values on a MySQL database table's row. This is my code: public int getSum(int var) { int x=0; // Select All Query String selectQuery = "SELECT sum(amount) FROM donations WHERE aid = '"+aid+"'"; SQLiteDatabase db = openOrCreateDatabase("shareity", Context.MODE_PRIVATE,...

INotifyDataErrorInfo and binding exceptions

c#,wpf,validation,mvvm
I'm using the INotifyDataErrorInfo interface to implement a general MVVM validation mechanism. I'm implementing the interface by calling OnValidate instead of OnPropertyChanged: public void OnValidate(dynamic value, [CallerMemberName] string propertyName = null) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); Validate(propertyName, value); } In the Validate Method I'm generating the validation...

How can I change opacity of an image in css without disturbing the overwritten text's opacity

javascript,jquery,html,css,css3
I want to change the opacity of an image in html but don't want to change the opacity of the text that is overwritten on it. this is my html code:- <div class="image"> <img src = "C:/Users/Anmol/Desktop/NewSite/Images/background/bg_4.jpg"> <div class="text"> <h1>My Site</h1> </div> </div> and this is its css code:- .image{...

How to scale image block using only css?

html,css,html5,css3,scale
Here is 3 inline blocks. The first one is scalable and the right two blocks has fixed width. In case we resize browser right to block should be visible anyway. #blockID should fit the page, at the same time image should be scalable if we resized window. I'm trying to...

Is there a SQLite3 query generator?

ruby-on-rails,ruby,sqlite,sqlite3
I am having a database in Ruby on Rails application using SQLite3. Knowing my table, is there an open source project which can provide me an easy way of creating sqlite queries? For example, based on the table names and order, I have a the available joins, and then I...

Apply a css -webkit-filter grayscale before using a background-blend-mode keeping the color

html,css3,grayscale,blending,background-blend-mode
I'm trying to achieve a monochrome colored image on mouse hover, where the colors of the image are transformed to grayscale and the gray shades afterwards replaced with the shade of color i'm blending with. It could look like this To simulate this in photoshop you can grayscale a image...

BindingExpression path error on datagrid

c#,wpf,datagrid
I have a datagrid that represent five columns, the last column contains only button. The xaml code for datagrid looks like: <DataGrid.Columns> <DataGridTextColumn Header="Prefix" Binding="{Binding Prefix, UpdateSourceTrigger=PropertyChanged}" Width="*" /> <DataGridTextColumn Header="Path" Binding="{Binding Path, UpdateSourceTrigger=PropertyChanged}" Width="4*" /> <DataGridTextColumn Header="User" Binding="{Binding User, UpdateSourceTrigger=PropertyChanged}" Width="1*" /> <DataGridTextColumn Header="Password"...

how can I show loading gif until deleting?

c#,asp.net,gif
I have a delete button on a repeater which is in update panel. When i click the delete button, it can delete, but It takes about 10 seconds. So I want to add a loading gif . I am beginner on adding gif. Please help me. Thanks for interests <asp:UpdatePanel...

Merge duplicate objects in array of objects

javascript,arrays
I have below array of objects, var data = [ { label: "Book1", data: "US edition" }, { label: "Book1", data: "UK edition" }, { label: "Book2", data: "CAN edition" } ]; I want to merge the duplicate objects based on attribute 'label' so that Final output will look like...

How can I insert tcov to Make File

code-coverage,solaris
How can i use tcov on Solaris in make file? My make file makes .o files and then the .so files which is copying to the lib's folder. I work with Oracle BRM CFLAGS_solaris= -g -xcg92 -xprofile=tcov C++FLAGS_solaris= -g -library=%none -DPIN_NOT_USING_OSTREAM CPPFLAGS = -I$(INCDIR) -I$(INCDIR_MDS) -DPCMCPP_CONST_SAFE LDFLAGS_solaris= -G SL_EXT_solaris= so...

the --harmony flag in the args parameter seems not to work

node.js,vscode
the --harmony flag for node in the args parameter seems not to work. I can't use fat array functions. Here part of lounch.json "configurations": [ { // Name of configuration; appears in the launch configuration drop down menu. "name": "Launch app.js", // Type of configuration. Possible values: "node", "mono". "type":...

Overriding RazorView's RenderView method

asp.net-mvc,razor
I'm working on a class which should scan the whole html view, parse it, and replace some elements inside the DOM. For that I decided to create a custom RazorView and override the RenderView method: I call the base.RenderView to get the writer populated, then get the string in it,...

Swift : Dismiss a PopOver when a tableview cell is selected

swift,popover,dismiss
I have a two controllers. The first one has a navigation bar with an item of Bookmarks Button which I press to display my second controller with has a tableview inside of it. Example project from this link : http://www.koraybirand.co.uk/download/xcode/PopTest.zip I want to be able to select one cell and...

can we create angular js apllication using Simple aspx

c#,asp.net,angularjs,asp-classic,angularjs-scope
Can We create a Angular Js application in ASPX web forms using three tier architecture (Database Layer,Business Layer)?

Why does the `FetchMode` query property remove fields from the parent data source?

axapta,dynamics-ax-2012-r2
When opening the query SalesTableListPage from the AOT, you can choose the field MatchingAgreement (shown as "Agreement Header record ID (Record-ID)") in the field lookup. The same is not possible for query SalesUpdate, field MatchingAgreement and several others (which seem to be related to relation fields where the relation is...

How can get custom attribute value in meteor?

javascript,checkbox,meteor,javascript-events
How can get the value of "key" attribute which is checked??? Html Code: <input type="checkbox" class="each-tab-1" key="some1" value="456"> <input type="checkbox" class="each-tab-1" key="some1" value="789"> <input type="checkbox" class="each-tab-1" key="some2" value="890"> <input type="checkbox" class="each-tab-1" key="some2" value="901"> <input type="checkbox" class="each-tab-1" key="some1" value="012"> JS code: 'click .action' : function(event, template){ $("input[class^=each]:checked").each(function(){...

C++ reference in for loop

c++
As in the for loop of the following code, why do we have to use reference (&c) to change the values of c. Why can't we just use c in the for loop. Maybe it's about the the difference between argument and parameter? #include "stdafx.h" #include<iostream> #include<string> using std::string; using...

No _fdopen on Linux and gcc

c++,visual-c++,g++
I'm calling fdopen. On Windows, using Visual C++ 2010, when I call it I get a warning saying Warning 1 warning C4996: 'fdopen': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _fdopen. On Linux (g++ 4.8.2) it works. When I switch to _fdopen,...

Multiple words in function type declaration confuses me

haskell
I understand haskell's function type declaration like, length :: String -> Int prefix :: Int -> String -> String But sometimes, the types on the right side are not simple types like String, Integer but it contains multiple literal words, and the words that look like custom defined etc. For...

Verify.js library not validating

javascript,jquery,validation
The verify.js documentation website (http://verifyjs.com/) makes it seem that, in order to get form validation on your site, all you have to do is: Link to the github-hosted library <!-- Verify.js (with Notify.js included) --> <script src="//raw.github.com/jpillora/verifyjs/gh-pages/dist/verify.notify.min.js"></script> Make sure you have jQuery linked (of course!) Add validation rules, by putting...

Cakephp with Adobe Muse CC

cakephp,adobe,muse
I'm in a new project and I want to know if I can combine Adobe Muse CC with Cakephp and how : I explain : My partner want design his website with this software and as I see, Adobe Muse generate .html, .css and .js files. Now if we want...

Implementing flash messages in Yii framework

php,flash,yii
This is my function from my controller : public function actionUser(){ Yii::app()->user->setFlash('success', "Data1 saved!"); .... } In the view If I write this : <?php echo Yii::app()->user->getFlash('success'); ?> it works, BUT I want to appear somewhere above the content and then automatically fade out after a few second. I tried...

Progress/cancel callback in Tesseract using ETEXT_DESC

android,c++,tesseract,tess-two
Is there a way to specify a progress and cancel callback in Tesseract? I'm using Tesseract in Android, using the tess-two project. There is already a previous question - Android Tesseract progress callback. However, the answers there imply that it's not possible. I have another crucial detail to add -...

`Heroku pg:backups capture` gives “Resource not found” error

postgresql,heroku,pg
When running this command - either locally or through Codeship.io - I get an error message saying "Resource not found" $ heroku pg:backups capture ! Resource not found The problem started 2 days ago and thus my first guess was that it's because of the transfer from the old to...

Building Latex/Tex arguments in lua

lua,latex,tex
I use lua to make some complex job to prepare arguments for macros in Tex/LaTex. Part I Here is a stupid minimal example : \newcommand{\test}{\luaexec{tex.print("11,12")}}% aim to create 11,12 \def\compare#1,#2.{\ifthenelse{#1<#2}{less}{more}} \string\compare11,12. : \compare11,12.\\ %answer is less \string\test : \test\\ % answer is 11,12 \string\compare : \compare\test. % generate an error...

How do I change the default link structure in Apache2?

ubuntu,apache2,server
I recently made my own LAMP-stack server for the first time, and I have a question regarding the link-building on my multiple domains. I have a single IP with about 30 domains, in its own folders. What I want to do, is to link the "root" to the root of...

Java InputStream to ByteBuffer

java,inputstream,bytebuffer
I am reading dds textures, but since once built the jar I can't access those textures through url and file and have to use InputStream instead. So I would need to know how I can obtain a java.​nio.ByteBuffer from an java.io.InputStream. Ps: no matter through 3rd part libraries, I just...

For Express Checkout, are you required to use the official paypal buttons for checkout?

paypal,paypal-sandbox
I keep reading everywhere that you are REQUIRED to use the (ugly) yellow buttons PayPal provides you with, yet when I go to www.bustedtees.com or www.devtees.com they use their own buttons that then link to the Express Checkout. Which one is correct?...

Resource with binding to parent DataContext

c#,.net,wpf,xaml
I want to have access to parent DataContext in resource to use it in binding. Here is sample: <Window x:Class="WpfApplication44.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:l="clr-namespace:WpfApplication44" x:Name="MyWindows" Title="MainWindow" Width="525" Height="350" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <Window.Resources> <l:SomeResource x:Key="SomeResource"> <l:SomeResource.Context>...

Unable to push messages to apache kafka?

java,apache-kafka
I am new to kafka and trying to run a sample apache java producer code to push data to kafka. I am able to create new topics through java but while pushing, I am getting an exception. Here is the code: package kafkaTest; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import...

Python - ASCII encoding string in the unicode string; how to remove that 'u'?

python,unicode,encoding,ascii,urlencode
When I use python module 'pygoogle' in chinese, I got url like u'http://zh.wikipedia.org/zh/\xe6\xb1\x89\xe8\xaf\xad' It's unicode but include ascii. I try to encode it back to utf-8 but the code be changed too. a = u'http://zh.wikipedia.org/zh/\xe6\xb1\x89\xe8\xaf\xad' a.encode('utf-8') >>> 'http://zh.wikipedia.org/zh/\xc3\xa6\xc2\xb1\xc2\x89\xc3\xa8\xc2\xaf\xc2\xad' Also I try to use : str(a) but I got error :...

Using Routing to return a WebForms page

c#,webforms,asp.net-5,asp.net-routing,asp.net-mvc-6
If I have a simple Default.aspx WebForms page under Views/WebForms/Default.aspx, how do I configure the MVC routing to open the Default.aspx page at startup? I've tried reading some articles regarding the MVC 6 routing, but I don't think they're mentioning anything about incorporating WebForms routing with the new MVC 6....

IOS & Objective C - how can i resolve this error “implicit declaration of function ”class_getname “ is invalid in c99”?

objective-c,ios6,xcode6
Actually there are two errors, the first one is : "implicit declaration of function "class_getname " is invalid in c99" The second one is : incompatible integer to pointer conversion initializing 'const char*' with an expression of type 'int' my method is : -(void) donneesrecoltees:(NSData *)donnees { NSError *erreur; NSNumber...

How to close browser tab with alert message in c#

c#
I have been trying with below code its getting execute but messagebox not displaying and tab also not getting close. ScriptManager.RegisterStartupScript(this, this.GetType(), "Messagebox", "alert('Record Deleted successfully.Note: This tab is now getting close');", true); so i just remove the 'alert' code from above code then its getting execute and getting close...

get string with parsing in python list

python,string,list,python-2.7,parsing
i have list like this ["<name:john student male age=23 subject=\computer\sience_{20092973}>", "<name:Ahn professor female age=61 subject=\computer\math_{20092931}>"] i want to get student using {20092973},{20092931}. so i want to split to list like this my expect result 1 is this (input is {20092973}) "student" my expect result 2 is this (input is {20092931})...

Jmeter Server with modified execute(allowed) permission still not executable

jmeter
I am trying to do a distributed testing to JSON APIs. But in Ubuntu 14.04, Jmeter-server (the slaves) just don't run. I have tried chmod +x, going root, even the hazards of chmod 777. But still, when you execute "./jmeter-server", permission denied still appears. Why is this so?

Loop and add with 2 lists

python,list,python-2.7,for-loop
I have two lists in the next code snippet: lst1 = ['a','b','c','d'] lst2 = [1,2,3,4] I'm willing to loop over the second list while using the first and get the following: 'a','b','c','d' 'a','b',1,'c','d' 'a','b',1,2,'c','d' 'a','b',1,2,3,'c','d' 'a','b',1,2,3,4,'c','d' how am I able to do this using a for loop? Thanks...

Is finding a subset with exact cut with other given subsets NP-hard?

algorithm,complexity-theory,combinatorics,computation-theory
I am trying to figure out whether the following problem is NP-hard: Given G_1,..,G_n subsets of {1..m} c_1,..,c_n non-negative integers in {0..m} Find T subset of {1..m} S.T. for all i=1..n, T intersects G_i in exactly c_i elements I tried to find reductions to NP problems such as coloring, or...

How to use SQL query with havng count here?

sql-server,group-by,having-clause
I having Table(Tbl_Test) with following data. RecordId BatchName Numbers MQC 1 20150443 321106 0 2 20150430 321107 0 3 20150430 321107 1 4 20150412 321110 2 5 20150430 321118 6 20150430 321120 7 20150432 321120 8 20150430 321126 9 20150432 321127 10 20150430 321129 11 20150431 321129 From the above...

TSQL - View with cross apply and pivot

sql-server,excel,tsql
this is my base table: docID | rowNumber | Column1 | Column2 | Column3 I use cross apply and pivot to transform the records in Column1 to actual columns and use the values in column2 and column3 as records for the new columns. In my fiddle you can see base...

PayPal button with 'min_amount' AND 'set_customer_limit'

php,paypal
I have created a non-hosted PayPal-Button with a text input to let users define an amount to pay. It's a subscription button. Now the problem is that there must be a minimum amount to pay, say 101 (CHF - Swiss francs). According to the docs of PayPal HTML-Variables I have...