FAQ Database Discussion Community


How to overlay a glass pane over a panel (div) in GWT

java,user-interface,gwt
I am building an "Edit" widget. To edit a data entity. I want to add auto save to this and while the auto save is happening I want the edit panel to be disabled and overlayed with "glass panel"... in other words a translucent panel with a message saying.. "saving"....

Create a search animation sliding the text input part from the right to left

jquery,animation,search
I want to create a animation on search loop icon when hovering in it.First the loop only is displayed like this picture And when I will hover on the loop icon the text input must appear from the right inceasing its width to left and get 100% width. I tried...

What to do when a button click work for some datasets and not for others?

c#,asp.net,webforms
I have a page where users can work with their data. The page has 2 gridviews. Initially, the top grid display records that can be selected with a "check box" column and added to the other gridview with Add/remove buttons. This works well and has worked well for years. Suddenly,...

String date to NSDate with 2 different string data

ios,objective-c,osx,swift
I'm working with an API who send me 2 types of dates (yeah, this is awful ...). I'm dealing with "2015-03-05T23:18:13+00:00" and "2015-03-05T23:18:17Z" so far, I haven't successfully convert them to a proper NSDatehere's my try : var date = NSDateFormatter() var time = "2015-03-05T23:18:17Z" date.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" date.dateFromString(time) and...

Read/Write to PPM Image File C++

c++,ifstream,ofstream,ppm
Trying to read and write to/from a PPM Image file (.ppm) in the only way I know how: std::istream& operator >>(std::istream &inputStream, PPMObject &other) { inputStream.seekg(0, ios::end); int size = inputStream.tellg(); inputStream.seekg(0, ios::beg); other.m_Ptr = new char[size]; while (inputStream >> other.m_Ptr >> other.width >> other.height >> other.maxColVal) { other.magicNum =...

Struts2 sj:head with scriptPath

struts2,struts2-jquery
I have a web application made with Struts2 . I'm using struts2-Jquery plugin. With this setting in the jsp head section: <%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <head> <sj:head/> </head> Everything is fine, the generated HTML code looks like this: <script src="/MyContextRoot/struts/js/base/jquery-1.10.0.min.js" type="text/javascript"> Regarding to the API: https://code.google.com/p/struts2-jquery/wiki/HeadTag If I change...

Highlight changes in a table (ASP/MVC5)

asp.net,asp.net-mvc,asp.net-mvc-5
I'm developing a Web small application designed to display stock quotes. To do so I have created a controller (TradingController) designed to retrieve all the quotes from my service layer. public class TradingController : Controller { private readonly IQuoteService _service; private readonly IQuoteMapper _mapper; // GET: TradingPlace public TradingController(IQuoteService service,...

_sbrk function not found when placed in a static library

c,gcc,linker,arm
I'm creating a bare-metal application for the stm32f407 microcontroller, which has an ARM Cortex M4 core. As such, I'm delivering the implementation of functions like _sbrk myself. I now find that when I try to create a static library containing _sbrk, and link it with my main.c into an application,...

Why was the double colon operator chosen for Java 8? [duplicate]

java,syntax,operators,java-8
This question already has an answer here: Why did Java 8 introduce a new “::” operator for method references? 3 answers Prior to Java 8, my observation was that the de facto standard for referring to member methods was by using the # symbol (such as Object#toString()). Then along...

Are statistics accumulated across multiple check-sats?

z3
Are the numbers returned by (get-info :all-statistics) accumulated across multiple calls to check-sat, and across multiple push-pop scopes? Or are they reset at each check-sat (or at push or pop)? Phrased differently, if I get statistics at various points during a run of Z3, and if a certain statistics, e.g.quant-instantiations...

Switching a class on the event of a slideUp() of div

javascript,jquery,html,css
I've written this function that opens divs, revealing their text when you click on the the title above it. Opening one div will close any other open divs in the section. What I want to happen is when the div is open, the title changes colour and then changes back...

Cropper returns null Uri

android,android-intent,camera,gallery
My app has possibility to change user avatar (with latter uploading it to web service). But on some devices Cropper ("com.android.camera.action.CROP" Intent) starts, but returns null Uri. Could u point me what i've done wrong? 1st user picks photo with: public static void pickPhoto(final Context context) { Intent pickImageIntent =...

Improper Addition of array values

php,arrays
I have an array like this: Array ( [0] => Array ( [15] => Due [50] => Due ) [1] => Array ( [20] => Cancelled [30] => Due ) ) I want to display addition of the due amount on the parent array basis in the tabular format, like...

Passing parameter to onchange event in Rails

javascript,jquery,ruby-on-rails
I have a select tag in my rails app, and i want to call showSubTypes function function onchange event <%= f.select :type, RequestType.all.collect { |p| [p.typeName, p.id] }, {include_blank: true }, :onchange => 'showSubTypes()' %> Here i want to pass p.id parameter into my showSubtypes function. But i do not...

How to know if a text is too long for a textblock?

xaml
I have two textblocks. I want to set a custom text to the first one and if it's too long to be displayed entirely, I want to continue it to the second text box and a third one if necessary. How can I do that ? Is there a way...

Registering types with StructureMap via Scan method

c#,.net,dependency-injection,structuremap
I have IService interface and many IService implementations in other assembly. I need to register all implementations as service for types that are in inheritance chain between IService and concrete IService implementation. For example: public interface IService{} public abstract class BaseService<T>: IService{} And in another assembly: public class SomeSpecialService: BaseService<SomeType>{}...

How To Create a Vertical SeekBar in Xamarin?

android,xamarin,monodroid,xamarin-studio
I am using Xamarin Free Version and I am trying to Create a Seek Bar the following The Seek bar will be white with a white thumb and the golden box next to it is content Link to image: http://s8.postimg.org/gpt6ao5xh/Veritcal_Seek_Bar.jpg The only thing is that there will be 6 SeekBars...

Unsupported URL on ios 8

ios8,nsurl,nsurlrequest
I'm trying to fetch a json from google places with the following code: NSString *query = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/search/json?location=%f,%f&radius=%i&types=%@&sensor=true&key=%@", center.latitude, center.longitude, rad, types, kGOOGLE_API_KEY]; NSLog(@"%@",query); NSURL *googleRequestURL=[NSURL URLWithString:query]; [NSURLConnection sendAsynchronousRequest:[[NSURLRequest alloc] initWithURL:googleRequestURL] queue:[[NSOperationQueue alloc] init]...

Embedding Excel File Onto a Webpage [closed]

c#,asp.net,excel
I have an editable GridView in my ASP.NET Website which I want to Replace with an Editable Excel document. From my previous searches I've found that by using Microsoft Office or Google Docs we can only View the Excel file, but need to upload it to a Google Drive or...

Can two sql queries affect the same row at the same time

mysql,sql
In a table example with **id** **counter** 1 100 if I execute in parallel 100 queries: UPDATE example SET counter = counter - 1 WHERE id = 1; Will the final counter of that row be always 0? Is there any need to lock the table?...

jQuery Uncaught TypeError: Cannot read property 'msie' of undefined in drupal

jquery,drupal
I'm facing following error on my Drupal Website: caught TypeError: Cannot read property 'version' of undefined jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined caught TypeError: Cannot read property 'version' of undefined jquery.formalize.js?nkmwqx:13 Uncaught TypeError: Cannot read property 'msie' of undefined jquery.bgiframe.min.js?v=2.1:11 Uncaught TypeError: Cannot read property 'msie' of...

“puppet resource user” shows all users

puppet
If I run puppet resource user on a puppet node, it lists all users defined on the machine (from /etc/password ). All users have ensure => 'present' attribute. Shouldn't it list only the users in the classes that apply to this node ?

Create postgresql database entry using bash script

bash,postgresql,shell,debian
Below is a section from my bash script, which should create a frontend user: DBUSER="testing" DBNAME="testing" ADMIN_NAME="A" ADMIN_LNAME="B" ADMIN_EMAIL="[email protected]" ADMIN_PASSWORD="'password'" PGPASSWORD=$DBPASS psql -U $DBUSER -d $DBNAME -h 127.0.0.1 -c "INSERT INTO users_user VALUES (1, \'$ADMIN_NAME\', \'$ADMIN_LNAME\', \'$ADMIN_EMAIL\', \'$ADMPASS\', \'true\', \'zxc\')" The result I get it this: ERROR: syntax error at...

I have problems adding a RealmObject that contains a RealmList of LatLng

android,database,sqlite,realm
I know I need to extend RealmObject on all the objects that I have in realm, in order to create the database, but I use google maps and so I have a list of LatLng's in a object that I need to store in Realm. The LatLng is a google...

What does 'Pool of native msmq messages is full' trace message mean?

wcf,c#-4.0,msmq,svctraceviewer
I have been tracing messages using SvcTraceViewer.exe which were transmitted over MSMQ using a c# application, and have come across an informational event that I don't understand. The raw XML looks like this: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <EventID>262242</EventID> <Type>3</Type> <SubType Name="Information">0</SubType> <Level>8</Level> <TimeCreated...

Debugging Report DP class

axapta,dynamics-ax-2012
I have noticed that I can debug the DP class of the AX standard reports using the AX debugger running on my client machine. This is not something I can do with my own custom written reports. Also, I thought this code ran in CLR on the reporting server so...

Naming convention for MongoDB in combination with Play Framework (Scala)

mongodb,scala,playframework
I'm new to mongoDB and Play Framework (Scala). I came from Java and RDBMS. With regards to mongoDB, then everything is clear and on this subject much has been written. Use javascript syntax (first_name and even better "fn" to save space). But what about the work in the scala code...

Why FileNotFoundException is CheckedException?

java,exception,checked
I know FileNotFound is Checked Exception but though it is, only during the Run time this exception will occur.It is more like Arithmetic Exception(Unchecked). Whether it is checked or unchecked the exception will happen only during runtime. My Question is why we call the FileNotFound/IO/DB related stuffs as Checked Exception?...

Currying n arguments create n functions

f#,functional-programming
I have a function //normal version let addTwoParameters x y = x + y translate to curry version it looks like: //explicitly curried version let addTwoParameters x = // only one parameter! let subFunction y = x + y // new function with one param subFunction // return the subfunction...

Uncaught ReferenceError function not found

javascript,jquery,html
I have a onkey on a input but it won't find the function I have in my js file. I searched through some questions on here but can't find the solution for it. My input code: <input id="Name" type="text" name="name" class="form-control" onkeyup="autocomplet()"> <ul id="Name_list_id"></ul> jQuery: function autocomplet() { var min_length...

Positioning 3 divs: 2 rows and 1 column

html,css
I need to position 3 divs like in the image below: so far I got close with "float", but I was not able to achieve this result specifically. This is my current result: <head> <style> #div-container { width: 500px; height: 500px; border: 1px solid #000000; } .div1 { width: 200px;...

Values from View to Controller not recieved

c#,asp.net,ajax,asp.net-mvc,razor
My View: @using (Html.BeginForm("RegisterNewUser ", "RegisterUser", new { @class = "registerForm" })) { @Html.LabelFor(model => model.nickName) @Html.TextBoxFor(model => model.nickName, new { @class = "RegisterControls" }) <br /><br /> @Html.LabelFor(model => model.email) @Html.TextBoxFor(model => model.email, new { @class = "RegisterControls" }) @Html.ValidationMessageFor(model => model.email) <br /><br /> @Html.LabelFor(model => model.password) @Html.PasswordFor(model...

multiprocessing.Queue hanging when Process dies

python,multiprocessing
I have a subprocess via multiprocessing.Process and a queue via multiprocessing.Queue. The main process is using multiprocessing.Queue.get() to get some new data. I don't want to have a timeout there and I want it to be blocking. However, when the child process dies for whatever reason (manually killed by user...

Formatted table output, printing into R console

r
I have function that processes some data and I would like to print the intermediate steps while the function (a loop) proceeds. I could do that in 1 point where the updated data is all in one data.frame(). I'm thinking of some simple table as for example I saw as...

Google Cloud messaging service returning empty registration id

java,android,android-emulator,android-gcm,google-cloud-messaging
I'm running into an issue implementing Google Cloud Messaging. When i try to register my emulator i'm suppost to get the Registration ID of the device, which in this case is my emulator. So when i looked around i saw i needed to link a google account so i did...

Using ChangeListener for JavaFX ChoiceBox working with the String

java,string,javafx,java-8,changelistener
When using a ChangeListener added to a ChoiceBox, is there a way to access the items from the observableArrayList directly, to update for example a String type Instance variable? I implemented this code here, which lets me work fine, with the index values of the observableArrayList. But, I am pretty...

R's data.table can not find the function “.”

r,data.table
I read that data.table understands the dot "." as an alias of "list". But: > dt <- data.table(x = c(11, 22), y = c("f", "b")) > dt x y 1: 11 f 2: 22 b > dt[,.(y)] Error in eval(expr, envir, enclos) : could not find function "." > Why...

Why does javascript ES6 Promises continue execution after a resolve?

javascript,promise,ecmascript-6,es6-promise
As I understand a promise is something that can resolve() or reject() but I was suprised to find out that code in the promise continues to execute after a resolve or reject is called. I considered resolve or reject being an async-friendly version of exit or return , that would...

Catch refresh and change page to index.html

javascript,jquery,jquery-mobile
i have a question. I want to detect, if a user has pressed F5 or the refresh button. If so, i want to change the page to index.html. Here is my code: $(window).on('beforeunload',function(){ $.mobile.changePage($(document.location.href="/index.html"),{ transition:"slide", changeHash:false }); }); But it's not working. Has anybody a solution, how i can achieve...

How i can doing for call a object with a dot in middle, for example parsing one xml to php?

php,codeigniter,xml-parsing,xmlhttprequest
I need parse a response xml in php, and i call the object into object, but one object have a "." or "-" in middle. For example xml : [obj1] [obj1.1] Array( [value]xxxxxx ..... In php i trying : $myvalue = $xml->obj1->obj1.1['value']; echo $myvalue; And need a function or method...

Specifying whether or not to lazily load with Spring Data

java,spring,hibernate,jpa,spring-data
I have a lazy fetch type collection in an entity. And I am using Spring Data (JpaRepository) for accessing the entities. @Entity public class Parent{ @Id private Long id; @OneToMany(mappedBy = "parentId", fetch = FetchType.LAZY) private Set<Child> children; } I want two functions in service class and current implementation are...

Garbage Collector: Taking care of object with a reference to singleton

c#,asp.net-web-api,garbage-collection,singleton
Imagine such situation: you have a singleton object and a class that has a field that points to this singleton public class MyClass { private readonly MySingleton singleton = MySingleton.Instance; ... } And now you have an WebApi Controller and in every request you are creating new object of type...

in mongo can I insert a record only if it's not already there

mongodb,mongodb-query
I'm using immutable objects keyed with a unique hash. My client doesn't know if the object is the database or not. I want to do an insert only if the object does not already exist. I know I can query and then insert but that involves an extra round trip....

C pointer address is very strange

c,pointers,data-structures
Sorry for my poor English, I have written the C code for Splaying tree, but when I put the "Find()" operation in main function, I couldn't initialize the Tree, that is, without the line "Find()" , using GDB, I found the my_tree's value is "0x0" when breakpoint in line "MakeEmpty",...

How to remove a character at the beginning of each line in Richtextbox

c#,winforms,richtextbox
I am creating an app that will remove a certain character for each selected line if you click the button. For example: I have "//" in each line in a RichTextbox and coloured the text into red, it is like the function of comment & uncomment in Visual Studio. The...

Code utilizing GD ending up in an error that “image cannot be displayed”

php,gd
My code is as follows: <?php session_start(); $img=imagecreatetruecolor(150,50); $white=imagecolorallocate($img,255,255,255); $black=imagecolorallocate($img,0,0,0); $red=imagecolorallocate($img,255,0,0); $pink=imagecolorallocate($img,200,0,150); $grey=imagecolorallocate($img,150,150,150); $blue=imagecolorallocate($img,0,204,255); $redd=imagecolorallocate($img, 153, 0,0); function randomString($length){ $chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ023456789"; srand((double)microtime()*1000000);...

How can I retain the type property when deserializing with Jackson's @JsonTypeInfo?

java,json,polymorphism,jackson,deserialization
I have a setup like this: @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dishName", defaultImpl = Food.class) @JsonSubTypes(value = { @Type(name = "fries", value = Fries.class), @Type(name = "burger", value = Burger.class) }) public class Food { private String dishName; @Override public String toString() { return dishName + ",...

Schema reference failed to read schema

spring
I'm using spring 3.2.5 on my project. So when I create my appliation-context.xml I have this warning: schema_reference.4: failed to read schema document http://www.springframework.org/schema/beans/spring-beans.xsd because : 1)could not find the document 2)the document could not be read 3)the root element of the document is not <xsd:schema> I don't know where...

iOS: How to make thread sleep for seconds? [duplicate]

ios,objective-c,multithreading
This question already has an answer here: What's the equivalent of Java's Thread.sleep() in Objective-C/Cocoa? 6 answers In iOS env, is it possible to make current thread sleep for seconds, then execute my code? NSTimer, GDC or any technique is okay for me....

ng-click / ng-class combination not working as expected with $index

angularjs,angularjs-ng-click,ng-class
For some reason my ng-click / ng-class combination is not working. On click the class 'hide' has to be added based on the equality of the productDisplay variable. <div ng-repeat="product in project.data track by $index"> <p ng-click="productDisplay = $index"><strong>{{product.name}}</strong></p> <div class="fileList" ng-class="{'hide': productDisplay !== $index}">{{$index}}</div> I can click on the...

libcocos2dx resource error: resource directory does not exist

android,eclipse,box2d,cocos2d-x-3.0
Yesterday I tried to add Box2D to my cocos2dx project. One error appeared and I haven't been able to solve it. The error: [2015-03-06 10:41:41 - libcocos2dx] ERROR: resource directory 'C:\devAndroid\cocos2d-x-3.2\cocos2d-x-3.2\SuperCars\cocos2d\cocos\platform\android\java\res' does not exist The point is that the package explorer itself only shows a red exclamation in the project...

Syntax error in INSERT INTO statement. (VB and ACCESS 2013)

sql,vb.net,ms-access,ms-access-2013
Forgive me for asking this stupid question but... I really cannot figure out how to solve this syntax error In my database(which is access 2013) I have this fields in my table Fields - Data Types NO - Number RANK - Short Text LAST NAME - Short Text FIRST NAME...

Find OracleClientFactory type from GAC

c#,.net,.net-assembly
The Type.GetType method should find me a type in the GAC if I specify an assembly-qualified name. Here's what I did: Type factoryType = Type.GetType("System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient"); But factoryType is always null. Maybe I could specify a fully-qualified name instead, including PublicKey and all that, but I don't know the necessary...

Looking for a cause of random EAccessViolation in SysUtils.Format / System.Move

delphi,access-violation
I'm (users of my application are) experiencing weird EAccessViolation errors with a piece of code having no bad programming logic. The DisplayData function simply sets the caption of a label - no compile time errors, no bad data send to the SysUtils.Format() function. MadExcept call stack looks like: main thread...

BigQuery first record of a specific column

google-bigquery
here's a sample of my output: I need to take just the first record per each visitId (with the min time). I've tried to use the MIN function excluding the hits.time from the GROUP BY list: SELECT STRFTIME_UTC_USEC(date, '%U') AS WK, visitId, date AS SALES_DATE, hits.eventInfo.eventLabel AS SEARCH_DD, year(date) as...

trim base64 string by ltrim() missing character in PHP

php,base64,trim
here is a base64 code begin with: data:image/png;base64. I use ltrim() like this: $base64_data='data:image/png;base64,iVboR....'; $base64_data = ltrim($base64_data,'data:image/png;base64,'); but the result is wrong whitout character "i". is "VboR...." why?...

Errors with json_decode, array and foreach

php,arrays,json,foreach
I use this code for Virtuemart: $product_id_to_remove = 3; $cart = json_decode($_SESSION['__vm']['vmcart']); foreach($cart->cartProductsData as $k => $v){ if($v->virtuemart_product_id == $product_id_to_remove) unset($cart->cartProductsData[$k]); } $_SESSION['__vm']['vmcart'] = json_encode($cart); but I get the fatal error: Cannot use object of type stdClass as array in ... line 4. If I add true at json_decode($_SESSION['__vm']['vmcart']) I...

.append() method doesn't works with   in

jquery,html,string,whitespace
Have following code: $("[id$='somelement_detection']").parent().parent().append("<span id='checkspan_button' class='checkspan checkspan_unchecked'/>&nbsp;</span>"); but it produces wrong output: <span class="checkspan checkspan_unchecked" id="checkspan_button"></span> Without &nbsp; I can't use this span in IE for some actions. Any suggestion?...

JavaFX, Can you bind property of an moving circle?

java,binding,properties,javafx,circle
So i got one moving circle on a timeline. And im trying to bind it to the screen so when i rezise the screen on the app, i want the ball to scale instead of moving outside the screen. Is that possible? circle.centerXProperty().bind(pane.widthProperty().divide(2)); circle.centerYProperty().bind(pane.heightProperty().divide(2)); circle.radiusProperty().bind(pane.widthProperty().divide(2)); This is the code i...

Center label into imageview (Swift)

ios,objective-c,xcode,osx,swift
I have a tableview with a tablecell and ito that cell I have an imageview. Whenever I have an imageurl I will show the image into that imageview but when there is no imageurl I want to give the imageview a color and show a letter into it. Basically like...

Any pattern name for commands that are handled instead of executed

design-patterns
The command pattern of Gof describes a command with an execute method. This is in Wpf and Silverlight for example defined in the ICommand interface, enriched with a CanExecute Method. This type of commands encapsulates the parameters for the action to be executed, and the logic to call the execution....

Convert Array to dataframe

arrays,r
I have the following array and I would like to convert it to a dataframe with the column names(Time and DepressionCount). I am pretty much a complete beginner to R and some help is greatly appreciated. 2004 2004.25 2004.5 2004.75 2005 2005.25 2005.5 2005.75 875 820 785 857 844 841...

Why is this SQL INSERT failing without raising and exception?

c#,sql-server,azure,sql-insert
I have a problem with an INSERT into a table on Azure SQL which is failing - returning a -1 on rows affected using the ExecuteNonQuery command. The Table looks like this: and the code is like this: private void SaveUrls(ArrayList alUrls) { int rows = 0; this.Cursor = Cursors.WaitCursor;...

How to make table row at server side visible using javascript?

javascript,asp.net,c#-4.0
I am making a tr which runs at server side to invisible. But in some conditions,I want it to be visible.I am using the bellow script to make it visible: document.getElementById('trID').style.display = "block" and also i used: document.getElementById('hidebuttons').style.visibility = "visible"; But it is not working. Please help me on this....

Page design for a row is not coming properly

css,html5,twitter-bootstrap,d3.js
I want both the map and pie chart in a row, but it is coming in 2 different row. Any Help would be appreciated. Here is link: http://jsfiddle.net/2emnt8m3/14/ Image for the design: <div class="container"> ...

What does this mean? #if !(arch(x86_64) || arch(arm64))

swift,if-statement,architecture
I came across this unusual code in a tutorial I was using. #if !(arch(x86_64) || arch(arm64)) func sqrt(a: CGFloat) -> CGFloat { return CGFloat(sqrtf(Float(a))) } #endif It looks nothing like the code I've been learning so far. I know it's a square root function but the hashtag? Something about my...

Implement a typed restricted property

c#,oop,design
Two classes: A & B, each of which have a MyProp property. The MyProp property of A can only be of A type. The MyProp property of B can either be of A or B type. To implement this I thought about creating an interface IBase containing a property MyProp...

AngularJS Form submit

angularjs,forms,angularjs-directive,angularjs-ng-repeat,form-submit
Working on my first small AngularJS App I'm facing problems with a form submit. I worked trough the CodeSchool course and figured the most out by myself, but this form submit thingy... well I just don't get where I'm wrong so that's why it would be nice if you could...

Retrieve row id from table displayed in webpage

php,mysql,table
I have a MySQL table that is displayed in the webpage and every row has a submit button. When the submit button for a particular row is clicked, the first element i.e. row id should be retrieved. Should I use arrays to store the data or can I obtain the...

Creating complex data models in yaml front matter in Assemble

javascript,handlebars.js,assemble
Assemble front matter YAML supports dynamic data model creation at the top of a Handlebar page with this syntax --- myModel : { aFile : <%= fileName %>} --- <div> {{myModel.aFile.someProperty}} </div> where fileName is some json file. Is it possible to manipulate myModel in YAML, after creating it, and...

remove Nuke license expiration message - flexlm

nuke,flexlm
I have Nuke licenses installed on a flexLM server. The licenses are going to expire in a few days. When I start Nuke I get all the time this message "You have a temporary license for nuke on hostIDs [host] with 29 day(s) remaining." which it's annoying. Is there any...

Why only the First Element is being added to the div

jquery
I am trying to create the following HTML dynamically as shown in this fiddle I was trying it this way. When I click on the Add To swiper-wrapper Button , could anybody please let me know why only the first element is being added in this case ?? <div class="swiper-wrapper"></div>...

BLE + CoreData causes freeze (semaphore_wait_trap)

ios,multithreading,core-data,core-bluetooth
I'm developing an app that will receive data through CoreBluetooth (BLE) and store this with CoreData. They work well individually, but not together, and I assume this has something to do with threading. What I do Im using a singleton to handle the the CoreData interaction. The singleton initialization code...

C++11 variadic template function storage

c++,templates,c++11,callback,variadic-templates
I am currently reworking my callback system to C++11 variadic templates. Basically what I am trying to do is to store a function with a return value and any number of arguments. Afterwards this function should be called and parameters are loaded from a boost::archive and return value should be...

OOPS Concept Abstract and final

php,oop
can we create a final method in abstract class ? can we create a abstract method in final class ? pls give me explanation with coding. Thanks advance for your answer....

Performance penalty of sbt run

sbt,sbt-assembly
Is there any performance penalty when running a scala program with sbt run instead of using sbt assembly and creating an executable jar?

Calling methods inside .dll File in c#

c#,visual-studio
I created a DLL file in c# with the following content: namespace GenerateMemo { class GenerateMemo { public MySqlConnection connection; private string server; private string port; private string database; private string uid; private string password; public void SqlConnect(string _server, string _port, string _database, string _uid, string _password) { string connectionString;...

liferay 6: reach main site from breadcrumb

liferay,liferay-6
We have liferay 6.1-ga2 serving a main site and several subsites. In the protal settings we set /home as standard homepage, logout-page and root-url. Now if we navigate to a subpage /web/projectFoo and then want to return the main-site by clicking the link in the breadcrumb or manually typing http://example.com/...

Does Entity Framework need associations on both sides?

c#,entity-framework,ef-code-first
I have the following model: public class ProductGroup { public int Id {get; set;} public string Name {get; set;} } public class Product { public int Id {get; set;} public int ProductGroupId {get; set;} public string Name {get; set;} public virtual ProductGroup ProductGroup {get; set;} } What is the correct...

Jquery validate plugin not working on second time open of jquery dialog

jquery,jquery-validate,jquery-dialog
I am currently using jquery validate plugin to validate my dynamic fields in a jquery dialog box. All is working fine when I open the dialog for the first time and submit the form, but when I open it for the second time the validation is not happening. Can anyone...

REST api: How can I make sure that client has received all data?

c#,asp.net,asp.net-web-api
I'm developing an ASP.NET Web Api 2.2 app with .NET Framework 4.5.1 and C#. I have a method with this signature: [HttpGet] public IEnumerable<Models.ExternalCodes> GetCodes( ExternalCodesQueryData queryData) { // ... } Is there any method to make sure that client has received all data? Maybe HTTP protocol has some mechanics...

Override django's model delete method for bulk deletion

django,model,delete,bulk,imagefield
I'm overriding Django's model delete method in order to delete orphan files in the disk for image fields, something like this: class Image(models.Model): img = models.ImageField(upload_to=get_image_path) ... def delete(self, *args, **kwargs): self.img.delete() super(Image, self).delete(*args, **kwargs) This works fine when i delete single objects from the admin, but when i select...

Can I deploy different versions of the same war on different paths?

tomcat
I'd like to deploy multiple versions of a .war on the same Tomcat, on different paths. For example, I'd like old.war to serve requests on /, and then new.war to serve requests under /new/. The wars will contain different versions of the same code, so mostly the same packages/classes. This...

Find rows that are not in table1 but possibly in table 2 or table 3

php,mysql
I am trying to add a value from table_2 and table_3 that is not yet been added to table_1. Say table_1 and table_2 have some product names, I want the products to be added to table_1 that already isn't there, (I have read-only access to table_2 and table_3) What I...

Do javascript memory leaks matter after a page refresh? Why?

javascript
I've often wondered this. After a page refresh doesn't the browser throw everything away? Thanks...

Play a specific notification sound

android,android-mediaplayer
I've created a dialog for selecting a notification sound for an app. I'm querying the notification sounds by getting a cursor from the RingtoneManager: RingtoneManager manager = new RingtoneManager(this); manager.setType(RingtoneManager.TYPE_NOTIFICATION); Cursor cursor = manager.getCursor(); I then store the full path to it by concatenating the sound path with the name....

Automatically export result sets into csv

sql,oracle,oracle11g,oracle-sqldeveloper
I have to run several queries on an oracle 11g database, within SQLDeveloper 3.1. For example: select * from product; select * from customer; select * from prices; At the moment I am exporting the resultsets "per hand", I simply right-clickonto the result and thenexport` it. I would like to...

AngularJS: Cannot read property '' of undefined

javascript,angularjs
I´m trying to do something like this in AngularJS: .factory('TranslationService', function($location, $rootScope, $routeParams, $translate, $window, tmhDynamicLocale, LocationService, MetaService) { return { translate: function(language, translateUrlName) { $translate.uses(language).then(function() { this.translateUrl(language, translateUrlName); }); }, translateUrl: function(language, translateUrlName) { // do whatever } }; }) But I don´t know why I´m getting this error:...

Is there an easy way to divide a page into a 100 or more sections? [closed]

php,html,css,sass
Is there an easy way to divide a page into a 100 or more sections which can act as image holders without laboriously creating 100 divs. I'd like them to be responsive. I have limited knowledge of php or SASS which is where I suspect the answer is... Ultimately I'd...

How to quickly determine if a matrix is a permutation matrix

python,numpy,matrix,linear-algebra
How to quickly determine if a square logical matrix is a permutation matrix? For instance, is not a permutation matrix since the 3rd row have 2 entries 1. PS: A permutation matrix is a square binary matrix that has exactly one entry 1 in each row and each column and...

How to pass non-latin string to url parameter in django?

django,unicode,python-unicode
Using django 1.7 and python 2.7, in a views I have: page = 0 sex = [u'\u0632\u0646'] #sex = زن url = "/result/%s/%d" % (sex, page) return HttpResponseRedirect(url) Which needs to return: /result/زن/0 However the resulting url turns out to be: /result/[u'\u0632\u0646']/0 Which is not what envisage in the pattern:...

shift mouse click trigger

javascript,jquery,keyboard-events
I can trigger click event on element selector using trigger $('element selector').trigger('click') Is it possible to trigger shift click. I mean shift + left mouse click....

“value must be a number less than infinity” error when the variable is a integer

c#,datatable
I'm not sure if I should ask this, but the details might help on finding out :p I have a table like this And I'm using compute to get the interval where a double variable stands in the Variavel column double value = 6; double max Convert.ToDouble(DataAccess.Instance.tabela1vert0caso1W.Compute("MIN(Variavel)", "Variavel >= "...

colouring graph connections in R

r,graph,colors,tkplot
I built in R a graph and I succeeded in colouring some vertex using if statement in colour, i used the tkplot function to have a better visualization. Now I have the following graph: FROM TO A B A D B C B F D E E G E H...

VBA Excel code to check if certain text is found in selection, then change cell text

excel,excel-vba
I am working in the pricing department, I made a macro to change the part number into a hyperlink using this code Private Sub CommandButton1_Click() Dim userResponce As Range On Error Resume Next Set userResponce = Application.InputBox("select a range with the mouse", Default: = Selection.Address, Type: = 8) On Error...

Add UIViewController from another Storyboard

ios,objective-c,uiviewcontroller,uistoryboard
To get more structure in my project I started to use multiple storyboards. Now I want to push a ViewController from another Storyboard. This works as aspected with no warnings. Unless I open the ViewController for a second time. The push produces this error message: "nested push animation can result...

Magic constants separator php on iis

php,iis,yii
I am running PHP on an IIS and I am having trouble with magic constants I wish to use a framework(YII) which has alot of the following: require(__DIR__ . '\..\vendor\autoload.php'); Problem is that this returns: G:\PleskVhosts\***.com\api\web/../vendor/autoload.php Which causes obvious problems So I was wondering if there was a way to...

How Java interfaces are managed by JVM?

java
Assume that there is a base class without any method or attribute, like below class Base. public abstract class Base { public Base() {} } And we have another class(es) derived from class Base, say class Concrete. As far as I know, when we create an instance of the Concrete...

Laravel 5 package exceptions not firing Hander's render method

php,phpunit,laravel-5
I'm working on a package and using the Orchestra/Testbench package for my Unit tests. I'm trying to write a PHPUnit test that verifies the response is correct when an exception is thrown. In my repository I throw the following exception: use Acme\Common\Exceptions\ValidationException; ... throw new ValidationException($validator); I have registered the...

How to use AND operator in update operation for where clause in Android Sqlite?

android,sqlite,where-clause
I am trying to update my table, But It gives me error how can I use AND operator in Where clause for update? here is my code; public static void updateData(long lday, String id, String usedamount, String trashedamount) { // TODO Auto-generated method stub ContentValues updatedValues = new ContentValues(); updatedValues.put("usedamount",...