FAQ Database Discussion Community


remove duplicate based on position

c#,linq,list
I have two lists like below in C#. List 1 = [{Item="A",position =1},{Item="B",position =2},{Item="A",position =3}] List 2 = [{Item="AA",position =1},{Item="BB",position =2},{Item="AC",position =3}] Now i want to remove duplicate values in the List 1 and that position should be removed in the List 2. Example o/p List 1 = [{Item="A",position =1},{Item="B",position...

Can I not run shade plugin when there are no source changes?

maven,maven-shade-plugin
Can I configure maven shade plugin in such a way, that when there are no source changes it will not create shaded plugin again (and leave the old one) - in scenario when I don't use "clean".

Installing a package with bower

node.js,cmd,npm,bower
I found a calendar,and i need to install it with bower,but first i had to install node,npm,git.I found node and git on web and i've installed them with wizards.And if i want to use bower i have to install it with: $ npm install -g bower But i get this...

Validation in repeater causes strange error

c#,asp.net,validation,repeater
I have a repeater in which i have a textbox with a regex validator. The code looks basicly like this: <asp:Repeater ID="rptr" runat="server"> <ItemTemplate> <div> <!-- controlls --> <asp:TextBox ID="tbText" runat="server" ClientIDMode = "Static" EnableViewState="true" OnTextChanged="tbText_TextChanged"></asp:TextBox> <asp:RegularExpressionValidator ID="tbTextValidation" runat="server" Text="*" ToolTip="wrong!" ControlToValidate="tbText" SetFocusOnError="false" ValidationExpression="^([a-zA-Z])$">...

Produce a symbol from a symbol in a macro

metaprogramming,julia-lang,julia-macros
I'm not sure how to express this. I have a macro like so: macro dothing(xxxx) # create a new symbol ZC_xxxx = symbol("ZC_"*string(xxxx)) # esc so that variables are assigned in calling scope return esc(quote # assign something to the new symbol $ZC_xxxx = [555.0, 666.0, 777.0] # Store in...

filter html table based on a value by clicking a button using javascript

javascript,php,jquery,html
The code below creates a table from mysql on a web page. I want to be able to add 3 buttons and be able to filter the table information by male, female and show all using javascript/jquery. I have tried a few suggestions on stackoverflow but they don't seem to...

Programmatically go back to previous ViewController in Swift

ios,swift,apple,segue
(I am using Swift) and I send the user over to a page on a button click. This page is a UITableViewController. Now if the user taps on a cell, I would like to push him back to the previous page. I thought about something like self.performSegue("back").... but this seems...

python: text file processing, for loop and read operation conflict

python,for-loop,file-processing
I am learning to code in Python. Now I am experimenting with a file comparison program from here. My code is: #!/usr/bin/python3 def main(): fhand1 = open('mbox.txt') print('file handle for mbox is {}'.format(fhand1)) count = 0 for l1 in fhand1: count = count + 1 l1 = l1.rstrip() # Skip...

How do I re-render Meteor template after Save File dialog is closed?

meteor
Here's a sample html of my template to download a file: <template name="download-file"> <a href="{{this.url download=true}}" </template> After clicking on the "a" tag, the Save File dialog opens up as expected. However, the "download-file" template is now displayed blank, and it does not get re-rendered when the Save File dialog...

Problems with boost's shared_ptr when using yaml-cpp

c++11,boost,cmake,yaml-cpp
I am trying to use yaml-cpp in a code but I get the following error: yaml-cpp/0.5.1/include/yaml-cpp/node/detail/node_ref.h:47:95: erreur: use of deleted function ‘boost::shared_ptr<YAML::detail::memory_holder>::shared_ptr(const boost::shared_ptr<YAML::detail::memory_holder>&)’ void push_back(node& node, shared_memory_holder pMemory) { m_pData->push_back(node, pMemory); } The code which leads to this error is: #include <cstdlib> #include <yaml-cpp/yaml.h> int main() { YAML::Emitter out; return...

Most efficient way to check if time lies between start time and end time in Python

python,datetime
I already have working code for this but i'm still very new to python and I know there is a better way of doing this. This is the code i've used in a motion detection script on my raspberry pi. It simply checks if it occurs in the timeframe when...

super.init' cannot be called outside of an initializer in swift

swift,ios8
code: override func awakeWithContext(context: AnyObject?) { super.init(context: context) let date: NSDate? = DataAccess.sharedInstance.getLatestDate() if date != nil { dateLabel.setText(date!.description) } } i am using xcode6.3 beta. when i run project it give error as "super.init' cannot be called outside of an initializer" why i am getting this error.any help will...

Match string to regepx using JavaScript

javascript,regex
Hello I have a string with some path. It looks like .../my/test/...., I want to mutch all string where exists /my/test/. But I am newbie in RegEpx and dont know how I can do this? I need to escape /? I try something like this: \"[^/"]+/my/test/+[/$] but wont work (and...

rmmovl dynamic number of bits

assembly,y86
I know that rmmovl can be used in the following way: rmmovl %ecx, 4(%edx) But how can I dynamically set the number of bits to move down the stack (4 in this case)? I've tried setting a variable with the value I want to shift to, such as rmmovl %ecx,...

Remove InputVerifier from JTextField

java,swing,jtextfield,inputverifier
I'm really surprised this is not in the documentation or at least google. I have a class that is likely to need to remove the verifier or replace it with another one. In particular, these methods are defined in the interface: /** * Add the verifier */ public void bind();...

Anonymous Inner Classes need to override their existing methods?

java,anonymous-inner-class
So I created an anonymous Inner Class via obj.addMouseListener(new MouseListener() but because it gave me an error (it wanted me to implement at least 4 methods with names like mouseReleased, mouseClicked, etc. As I assumed the class didn't properly extend/implement the MouseListener, I stumbled upon another SO article (How can...

Locking table (or to use a transaction?) for payment

python,mysql
I have a web view similar to the following: def process_payment(request, user): amount = 'SELECT amount FROM table where user=user' PayUser(user, amount) return 'OK The problem with this is that if someone requested the same endpoint thousands of times (trying to cheat the system), it is possible that the user.get_balance()...

Error while accessing data attributes in console.log

javascript
I am trying to access the data attributes in js. But displays the error="Uncaught type error" var x=document.getElementById(this.id); console.log(x.src); console.log(x.data('image')); for x.src I m getting perfect-"http://localhost:3000/uploads/asset/asset3/199/small_ring3.jpg", but when I try for x.data('image'), it displays - "Uncaught TypeError: undefined is not a function58:646 (anonymous function)jquery.min.js:3 m.event.dispatchjquery.min.js:3 m.event.add.r.handle" here x is img...

String was not recognized as a valid DateTime for spanish region

c#,datetime
Following conversion work for "en-US" region but not for "es-AR" Spanish Argentina region. Please suggest where is I wrong! var cstZone = TimeZoneInfo.FindSystemTimeZoneById("Argentina Standard Time"); var _result = TimeZoneInfo.ConvertTimeFromUtc(DateTime.Parse("Mar 1 2015 1:00AM"), cstZone).ToString("MMM dd yyyy H:mm tt", new CultureInfo("es-AR")); ...

By using protege can we store & retrieve data's like we doing it on relational database?

semantic-web,ontology,protege
Hi I very new to semantic web and Protege. Can we store and retrieve data in Protege like we do in relational database? Or can we manipulate only models? if yes, do we need RDBMS for storing data and use Protege to manage the relationship?. Can we use protege as...

check and uncheck a dynamic checkboxlist

c#,asp.net
I have this checkboxlist that it's items fills with linq datasource now I want to check some of these check boxes programmatically... this is my checkboxlist: <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="LinqDataSource2" DataTextField="ProjectGroupTitle" DataValueField="ProjectGroupID"></asp:CheckBoxList> and this is my code trying to check some of these check boxes so far: for (int i...

Velocity animations for leave callback of ngAnimate

javascript,angularjs,velocity.js
I'm trying to get a leave animation working with velocity and angular so that when the table rows leave they move to the right. In the example I use the leave callback to try an animate the leaving of ng-repeat but the callback runs however nothing happens! angular.module('myApp', ['ngAnimate']) .controller('myCtrl',...

Passing array of dictionary to javascript function from iOS

javascript,ios,uiwebview
My javascript function needs this type of array: var data = [{ "sale": "202", "year": "2000" }, { "sale": "215", "year": "2002" }, { "sale": "179", "year": "2004" }, { "sale": "199", "year": "2006" }, { "sale": "134", "year": "2008" }, { "sale": "176", "year": "2010" }]; I want to...

Encapsulation of structure in class [closed]

c++
Is it good practice to encapsulate a structure used by a class inside the class if only the class uses it and not the user who will end up using the class, or does it not matter?

Is there a callback function when UIView's frame change?

ios,objective-c,autolayout
Suppose that I need to do something whenever a view's width or height changes. When not using autoLayout, I can do this by implementing layoutSubviews. But I find that this function is not always called when using autoLayout. Right now, I'm using the following code where something could possibly cause...

Prestashop override Blocktopmenu function

php,prestashop,prestashop-1.6,method-overriding,function-overriding
I'm trying to override the generateCategoriesMenu function from blocktopmenu.php class BlocktopmenuOverride extends Blocktopmenu { public function generateCategoriesMenu($categories, $is_children = 0) { die( var_dump ('hello I am an override') ); } } I've set up this in the folder override/modules cleared the cache file class_index.php when I load my index page...

Decorators - Throwing Invalid Syntax in Python

python,decorator
This may be an OS problem since I did saw on youtube videos where people were demoing how to use decorators in python in a Linux based system. So I'm trying to play with decorators. In its usual form, you create a function of it first, and then you use...

Drawing by Windows GDI inside of Qt

qt,drawing,gdi,qgraphicsview
I am trying to use Windows GDI inside of QGraphicsView paintEvent but have noticed some drawing issues, for example the drawing disappear or blinking when I resize window or minimize and maximize. When I use Qt instead of GDI its working perfectly. Here is the code: [UPDATED CODE] #include "CustomView.h"...

TIME part of DateTime in SQL Server

sql-server,datetime
In SQL Server I need to extract the time portion from this datetime '2014-01-01 14:13:00.000' in 'hh:mi:ss' or 'hh:mi:ss:mmm' format. I have tried this query but the output is wrong, why? Can you help me? Thanks in advance SELECT CONVERT (VARCHAR (12), '2014-01-01 14:13:00.000', 114) 'hh:mi:ss:mmm', CONVERT (VARCHAR (8), '2014-01-01...

Rails model validation fails on integer big number input (“out of range ”)

ruby-on-rails,validation,integer
I have Integer attribute in my model and I need back-end validation for that (it should be up to 7 digts only). In my model I do some validations like: validates :duration, format: { with: /([0-9]{1,7})/ } validates :duration, numericality: { less_than_or_equal_to: 9999999 } This works when I try to...

Can I rename every combobox with same name in excel?

excel-vba,combobox
There are a lot of combobox in sheet and they are appending dynamic. But all of combobox' assignments are same. They will run a function in macro. Can I rename all of combobox with same name? Or how can I do what I want? Sub ekranadi() Dim mainworkBook As Workbook...

Running a jar in php

java,php
Can you run a java jar file in php? Like when you press a button the jframe that you made pops-up in the website. I've already searched for bridging php and java but I think it's about running a java jar file that returns something and not the actual jframe...

Simulate Touch Controls Through Code

android,google-glass,google-gdk
I'm trying to make it possible to navigate through my Google Glass application by using head gestures. I'm able to recognize head gestures like looking to the right left and up. They each have their own method for what to do when this gesture is recognized Now I need to...

array difference in JavaScript that accounts for duplicates

javascript,arrays
When comparing two or more arrays that share the same element, is there a way to find the difference between them while returning a final array with that takes into account whether the occurrence of an element exceeds previous occurences across arrays? For Example: var arr1 = [1,1,1,1,1,1,5] var arr2...

How Do Chrome Apps/Extensions View Search/Browsing History if there is no permission for it?

javascript,google-chrome-extension,google-chrome-app
There are several apps/extensions that work with search/browsing history, here are just two: 1) https://chrome.google.com/webstore/detail/better-history/obciceimmggglbmelaidpjlmodcebijb?hl=en 2) https://chrome.google.com/webstore/detail/history-timeline/gjhpcfomcckgcaniehfgakaddjgncpeb?hl=en However, unless I'm missing something neither apps nor extensions have a permission for retrieving the full search or browsing history, only for deleting it, querying for a specific website, or adding urls to...

what is difference between using system.window.shapes and using system.IO?

c#,wpf
I am newbie in window presentation foundation and c# technology. I had a situation like, I am using shape and IO , when i use path some conflict-ion are occur, what should i do ? can I used it both in one page. Thanks In Advance.

Open server socket in android : permission denied?

android,sockets,root
I'm trying to create server socket on port 554 (rtsp) in Android and i'm getting BindException with 'denied' message: public RequestListener() throws IOException { try { mRtspServerSocket = new ServerSocket(mPort); start(); } catch (BindException e) { Log.e(TAG, "Port bind exception"); throw e; } } Are standard ports (or < 1024)...

Django:int() argument must be a string or a number, not 'list'

django,django-models,django-forms,django-authentication
This may be same be an alreday asked error but in my case error is same but a different question, Hi every one i have already writtem one django apllication in which i have a set of templates they are Login.html Logout.html dashboards.html After authentication in login form user will...

Ajax async inside a javascript object

javascript,jquery,ajax,oop,asynchronous
I'm building a javascript object for handling my ajax functionality (error handling, dealing with response). My problem is that it is only working when I set async: false inside the ajax request. In every other case the result is undefined. Some others advised here, that using async: false is a...

Android License Verification Check returns always Error Code 6

java,android,android-lvl
My LicenseCheckerCallback calls method applicationError and return errorCode 6. In my LogCat I get the following JavaStack: 02-27 08:55:18.258: I/LicenseChecker(19572): Binding to licensing service. 02-27 08:55:18.268: D/dalvikvm(19572): threadid=1: still suspended after undo (sc=1 dc=1) 02-27 08:55:18.268: D/dalvikvm(19572): GC_CONCURRENT freed 112K, 12% free 7284K/8263K, paused 12ms+2ms, total 27ms 02-27 08:55:28.233: I/System.out(19728):...

Understanding Delegate flow

c#,.net,sockets,delegates,tcplistener
First, I want to apologize if this seem like I shouldn't post this question. I have been battling to understand this code since the last 2 weeks and all to no avail. My main problem is understanding how this delegate works here messageInformer = new MessageInformer(this.Broadcast); I couldn't use debugger...

I need the method to return all values from the select query

java,mysql,return-type
I've been working on a school project, I'm a student and a rookie at that, so if my question seems too basic or silly for that matter, please bare with me. That said, I've been working on a project that requires me to retrieve data from a mySQL database. The...

How to Get line number of a word in file using ruby [closed]

ruby,file
suppose I have a file. I want to write a function that takes file and word. And returns the line numbers of that word def get_line_number(file, word) #logic return line_num end ...

ember.js check all checkboxes

javascript,ember.js,checkbox
Hi im learning ember and got stuck with checkboxes. Heres my template (part): <table> <thead> <tr> <th class="cell-delete"> {{input type="checkbox" id=colorId name=colorId class="js-custom-checkbox" checked=allChecked}} </th> <th class="cell-star"> &nbsp; </th> <th class="cell-broadcaster">Author</th> <th class="cell-title">Title</th> <th class="cell-date">Date</th> </tr> </thead> <tbody> {{#each message in model.entities}} <tr>...

i want splash screen until myform's contructor dosn't load for quickly display myform after login

c#,winforms
My application is hardware based so it have connection in first form's contructor called myform. i want to display splash screen until loads myform in background. application in c sharp. after splash screen login will display.

Java Simple Concurrent Server

java,multithreading,concurrency
I must design a simple server which receives messages from multiple nodes and stores them in a message repository. The code for the server is : public class CommunicationServer implements Runnable { private List<String> messages; private MessageRepository messageRepository; private boolean serverBusy; public CommunicationServer() { messages = new ArrayList<String>(); messageRepository =...

Prevent backspace button from navigating back to previous XPage

jquery,dojo,xpages,lotus-domino
In my XPages application, I have noticed that whenever I hit the backspace key (without an input field having focus), the application returns to the previous XPage. How can I disable this behavior? I believe this is possible with JQuery and / or Dojo but am unsure how to add...

PHP dump all data if script tries to allocate more than allowed memory

php,memory
Is there any way I can dump all variables with their values a script has into a file when the script tries to allocate more memory than it is allowed to? For debugging purposes.

Organize 3d points and found them by distance from a position

python,algorithm
I'm working in 3D context. I've some objects in this space who are represented by x, y, z position. # My objects names (in my real context it's pheromone "point") A = 1 B = 2 C = 3 D = 4 # My actual way to stock their positions...

Datatables plugin to search for header values

datatables,jquery-datatables
I am using jquery's dataTables plugin. I am having skills value as header in my table. I want to serch for users with specific skills. For example as shown in figure i want to search for users who have skill php. Then i should get the name of John. For...

jquery: shake div horizontally if input empty on submit?

jquery,html
I am trying to use jquery to validate my form, if the user leaves either input box blank it will display a red border. Now I am trying to add a horizontal shake effect to the outer div 'home_column'. However this is not working, the red borders around the input...

ASP MVC Return JSON

json,asp.net-mvc
I am working on a web API with ASP.NET MVC (.NET 4.5.2) (I'm quite new to ASP) and I would like the change to response format from my controller to be JSON instead of XML. I tried several things like using the ActionResult return type and returning something like new...

How to insert Element in GWT Label

java,html,gwt
I'm using GWT UiBinder and I want to create the following Label -------------------------------------------- You can upload only .jpg images -------------------------------------------- <g:Label ui:field="imgInfo">You can upload only <b>.jpg</b> images</g:Label> But of course it is incorrect example. I want to use Label, because I want to add PopupPanel final PopupPanel popupImgInfo = new...

Linq GroupBy with each null value as a group

c#,linq,group-by
I have an object with a nullable int property "GroupId". With a List of this object, I would like to do a GroupBy on this "GroupId". But if I do it, all the null values will form a group. Example : Object 1 : GroupId : NULL Object 2 :...

How to launch iOS App from Apple Watch?

objective-c,watchkit,apple-watch
Is there any way to launch the iOS App from Apple Watch? Edit:- Tried using both api below but doesn't work:- Apple Watch Code Calling Inside interfaceController.m + (BOOL)openParentApplication:(NSDictionary *)userInfo reply:(void(^)(NSDictionary *replyInfo, NSError *error)) reply; // launches containing iOS application on the phone. userInfo must be non-nil iOS Code Calling...

Error: Server Error while uploading file to mysql using org.apache.commons.upload

google-app-engine,apache-commons
I am trying to upload a word doc file in MySQL database in a Google app engine application. I am using org.apache.commons.upload to upload file.i have tried so many variations in my code but it every time it gives me same error. Error: Server Error The server encountered an error...

How to encoding AndroidManifest.xml when create apk

android,encoding,android-manifest
According to thr requirement i have to encode AndroidManifest.xml while creating apk so that no one can extract my project information. How can i achieve this? I searched on google but didn't get any solution for this. i Also tried this but got no solution. Any help will be appreciated....

MySQL Loop from two different Tables

php,mysql,union
i want to get values from two different tables. my problem is the table have no relation to each other but the "team_id" i have a "player" and a "player_stat" table. my result should look like: Playername (from the "player" table) Points: 8, Assists: 2, Fouls: 0 (from the "player_stat"...

In phpMyAdmin Edit Index dialog, the SQL statement is “lost” after save

mysql,phpmyadmin
The greatest strength of phpMyAdmin (IMHO) is that it seemed to strike the perfect balance between GUI comfort and raw coding of SQL. I am currently on version 4.1.13, and recent versions have tended to try to introduce a few jQuery UI effects and AJAX. Now I am having serious...

Pipeline refill cycles for instructions in arm

assembly,arm,pipeline,instruction-set
Following are the instructions of arm Cortex M4 processor with 3 stage pipeline.How do we come to know the number of pipeline refill cycle for such instructions?? Assembler Cycles 1. MOV PC, Rm 1 + P 2. ADD PC, PC, Rm 1 + P 3. B <label> 1 + P...

NoRouteToHostException while hadoop fs -copyFromLocal

java,apache,hadoop
I installed hadoop 2.5.1 on CentOS7.0 and I'm using 3 computers with below hosts file, the same as all 3 computers I'm not using DNS. XXX.XXX.XXX.65 mccb-com65 #server XXX.XXX.XXX.66 mccb-com66 #client01 XXX.XXX.XXX.67 mccb-com67 #client02 127.0.0.1 localhost 127.0.1.1 mccb-com65 I execute the command $hadoop fs -copyFromLocal /home/hadoop/hdfs/hdfs/s_corpus.txt hdfs://XXX.XXX.XXX.65:9000/tmp/ I met below...

Filemaker pro 13 portal tool

foreign-keys,filemaker,portal
I am using FileMaker Pro 13. I need to add Portal to show data from related table. Some fields which I wanna add to Portal are "Foreign keys" from that related table that are linked-related to third table. Results I am getting in Portal from those fields are numbers, but...

bash script error: file or directory doesnt exist

bash,shell,ubuntu,ubuntu-14.04
I'm using Ubuntu 14.04 This is my first time writing a bash script. Here it is: #!/bin/bash ${file}="/home/isra/files/mongoTemp.json" ${fdiff}="/home/isra/files/mTempDiff.json" . . commands . . mv ${file} ${fileold} . . commands . . exit But it gives me these two errors: ./index.sh: line 4: =$HOME/files/mongoTemp.json: No such file or directory ./index.sh:...

Oracle while loop

database,oracle
This is my current oracle statement: WITH table_ AS ( SELECT DATETIME , TOTALTIME1 , RAWOUTPUT1 , CASE BITAND(RAWOUTPUT1, POWER(2,0)) WHEN 0 THEN 'FALSE' ELSE 'TRUE' END AS Pumpe1_1 FROM pump_box_hist ) , table2_ AS ( SELECT DATETIME , TOTALTIME1 , RAWOUTPUT1 , Pumpe1_1 , LEAD (Pumpe1_1) OVER (ORDER BY...

Grep -r “string” doesn't work

shell,grep
I'am using putty to search for a specific word in a file on my host . But when I use: grep -r "string here", the command line just enters, but don't return me anything. Can anyone tell me how? I want to search in ALL FILES of the host....

Using Function onChange

javascript
I have a text input: <input class="stops" id="stops" onchange="stopsChanged();"> And my current JavaScript looks like: <script> function stopsChanged(){ alert(); } </script> But when I run my code, I get this error: ReferenceError: stopsChanged is not defined Why am I getting this error?...

Autolayout: Fallback constraints for neighbouring views when removing a view

ios,uiview,autolayout,nslayoutconstraint
I'm trying to make this work in a UICollectionReusableView (UICollectionView Header) context. The height required for strings in UILabels A, B, and C is calculated and set as the gray view's height somewhat like this: - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section { .... CGFloat expectedHeightForLabelB = 0; if (stringB.length >...

How to open and read the two files at a time?

javascript,jquery
I try to open the two files and pass into the another function but it is not work. $.get('fasta', function (file) { var filedata = file; var seq = filedata.replace(/[\n\s]/g,""); var seqpass = new seqleng(seq); }, 'text'); $.get('pattern', function (patt) { var pattern = patt; var seqpass = new seqleng(pattern);...

I need code of DataManager.dll in Dynamics Ax Pos

axapta
my customer using Ax Pos and they want to an extra column in Customer Serach page: I must add the column in class but the class inside in DataManager.dll I have dll file but I cant find code of DataManager.dll. How can add the column of class? thank you....

Actionscript 3 and sorting incoming bytes from an arduino

arrays,actionscript-3,flash,arduino
im new to using action script so i apologies if this wont make sense, the issue iam having is that the incoming bytes from my arduino are not being stored properly in an array. The bytes come in one at a time from my arduino and will be stored in...

Pass value from table to input text Angularjs

javascript,angularjs,table,input
I have an input text with a table in which i filter some values from a json with an ng-repeat in meanwhile i'm typing. <input type="text" placeholder="Choose" ng-model="item.sTxt"/> <table> <thead> <tr> <th>First Value</th> <th>Second Value</th> </tr> </thead> <tbody> <tr data-ng-repeat="item in numberList.getList | filter:searchText" ng-click="setSelected(item.last)"> <td>{{item.first}}</td> <td>{{item.last}}</td> </tr> </tbody>...

Repitition of selected item in dropdownlist in PHP

php,drop-down-menu
I have this problem that the selected value in my dropdownlist is showing twice. What should i do so that it will show only once. <td> <select class="span8" style="width:100%" name="from_time[]" id="from_time<?php echo $count;?>" value="start_from" onchange="calculate_by_ajax(this.id);"> <option value="<?php $start_from=$jobs_result['start_from']; //$date_arr_to= explode(" ", $start_from); //$date_to= $date_arr_to[0]; //$time_to= $date_arr_to[1]; $sec="SELECT DATE_FORMAT('$start_from', '%H:%i') as...

Error in running android code on emulator

android,eclipse,sdk
While running an android code in Eclipse, I get an error saying "Installation error: INSTALL_FAILED_VERSION_DOWNGRADE Please check logcat output for more details.". But I have declared Target SDKVersion = 11, MinSDKVersion = 3, MaxSDKVersion = 21. Version Code = 15 Version Name = 2.0

Rounding a number to its nearest 10's place javascript

javascript
How to round a number to its nearest 10's place? Example if number = 123, then it should be rounded to 100, if it is 175 that is greater than 150 then it should round to 200 , the number will changed ?

UIBarButtonItem not clickable in UIToolBar

ios,swift,uipickerview,uibarbuttonitem,uitoolbar
I have a UIPickerView and I am adding a UIToolBar with 2 UIBarButtonItems to it. var toolBar = UIToolbar() toolBar.frame.origin.y = -40 toolBar.barStyle = UIBarStyle.Default toolBar.translucent = true toolBar.tintColor = UIColor(red: 76/255, green: 217/255, blue: 100/255, alpha: 1) toolBar.sizeToFit() var doneButton = UIBarButtonItem(title: "Done", style: UIBarButtonItemStyle.Bordered, target: self, action: "donePicker")...

assign javascript date to html5 datetime-local input

javascript,html5
DOM: <input id="myTextbox" type="datetime-local" /> Javascript (jQuery): $('#myTextbox').val(new Date().toISOString()); Doesn't work. The format of input[type=datetime-local] is supposed to be ISO 8601, which is what javascript's Date.toISOString() returns....

Dataset in asp.net

asp.net,datatable
I have a page in my website where a users can edit the records - one of the fields is a dropdown list. I've been told I can use this code below to populate the dropdown field. My question is this; if several people are working in the page is...

PHP Array from Form then display

php,arrays,html-form
I'm trying to build something that will allow a user to input names into a form text field with commas to separate and when they push submit to then have it put into an array and open a page that lumps those people into groups of x (also selected by...

iphone application login/logout buttons

ios,objective-c,login
I am developing an iOS app which contains login/authentication functionality. I putted a bar button item in the first view controller and a push segue to a login view controller where I implemented an IBAction with this code User *userObj = [[User alloc] init]; NSInteger username = [[self.telnumberTextField text] integerValue];...

NumberFormatException when trying to convert JTextField to Integer

java,user-interface,object,constructor,jtextfield
I've tried many things and I still can't seem to fix this error no matter what so I'm going to ask my own question. I keep believing that the error is at the ActionEvent where I try to convert the JTextfield into an int but it might be something else?...

Sum across columns and rows

sql,sql-server,sql-server-2005,sum,sybase-ase
Consider a table like this table +--------+---------+-----------+---------+-----------+ | BookId | ItemId1 | Quantity1 | ItemId2 | Quantity2 | +--------+---------+-----------+---------+-----------+ | 1 | 1 | 2 | 2 | 1 | | 1 | 3 | 1 | 2 | 1 | | 2 | 1 | 1 | 2 |...

BASH: Joining 2 CSV files based on common field name

bash,csv,join,awk,grep
I have 2 CSV files and I need to JOIN them using BASH: file_1.csv columns: track_id title song_id release artist_id artist_mbid artist_name duration artist_familiarity artist_hotttnesss year Sample date in file_1.csv TRZZZZZ12903D05E3A,Infra Stellar,SOZPUEF12AF72A9F2A,Archives Vol. 2,ARBG8621187FB54842,4279aba0-1bde-40a9-8fb2-c63d165dc554,Delerium,495.22893,0.69652442519,0.498471038842,2001 file_2.csv columns: track_id sales_date sales_count Sample data in file_2.csv TRZZZZZ12903D05E3A,2014-06-19,79 The relation between the files is...

How to use ECMAScript6 modules within webpages

javascript,ecmascript-6,babeljs
I'm pretty excited about using ECMAScript 6 features now via Babeljs - in particular, I'd love to start making my JavaScript code more modular using the new modules feature. Here's what I've written so far: // ECMAScript 6 code - lib.js export const sqrt = Math.sqrt; export function square (x)...

How to name a Github repository? [closed]

git,github
What is the suggested naming convention for a repository that consists of multiple words? Which one of the following is best? js-stack-example js-stack.example js.stack.example jsstackexample I would prefer the dash only solution (first one), but someone insists on using mixed style. I fear that dot can have special meaning in...

AttributeError while using Django Rest Framework with serializers

python,django,serialization,django-rest-framework,django-1.7
I am following a tutorial located here that uses Django Rest Framework, and I keep getting a weird error about a field. I have the following model in my models.py from django.db import models class Task(models.Model): completed = models.BooleanField(default=False) title = models.CharField(max_length=100) description = models.TextField() Then my serializer in serializers.py...

Cross thread exception when using Invoke()

c#,winforms,windows-mobile-5.0,motorola-emdk,smart-device-framework
I'm developing an application running on a Windows Mobile 5 based barcode scanner. Occasionally I'm experiencing a cross thread exception causing the application to fail. The application is written in C# 3.5 and is build on top of the Motorola EMDK for .NET but also uses parts of the Smart...

Remove Duplicates from a select list created from a json in the back

jquery,json,select
Hi guys please some help, I have a json like that... { Result: "OK", Options: [ { DisplayText: "Απρίλιος", Value: "4" }, { DisplayText: "Απρίλιος", Value: "4" }, { DisplayText: "Απρίλιος", Value: "5" }, { DisplayText: "Απρίλιος", Value: "5" }, { DisplayText: "Αύγουστος", Value: "10" }, { DisplayText: "Αύγουστος", Value:...

update rows where length > 50

sql-server,tsql,truncate
I have a table lets call it 'People' and it has a column called 'Name' lets say it used to have column specification of Varchar(500) and now it will be changed to Varchar(100) What TSQL can I write to do this update and basically trim each row where a row...

Enable and disable textbox if checkbox is checked

javascript,html,checkbox,textbox
I read this article as suggested by an answer for a similar question. I did everything the article said, but the end result wasn't what I wanted. I want the text box to be disabled by default. When the checkbox is checked, the textbox is enabled. What happened was that...

jQuery .not() selector not working with class [closed]

javascript,jquery,jquery-selectors
I'm trying to select all of the direct children of body, except for those that match a certain class. Whether I use the .not() filter or the :not() selector, the element I'm trying to filter out is STILL part of the selection when I filter by class name. However, if...

CodeIgniter: How can I store a photo name into database

codeigniter,upload,photo
I had looked for many examples about it and I did something as I can do. I will build a registration form. There will be five text fields and also a photo upload section. what I did The text fields are stored in the database. In here only one field...

Reversing ng-repeat's order, iterating over anglefire array

javascript,angularjs-ng-repeat,firebase
Being new to Angular and Firebase, naturally AngleFire is giving me troubles. I'm using ng-repeat to iterate over a synced array, and I'd like to reverse the order it's displaying. I've tried '| reverse' as well as variations of that, sorting the array on the FireBase side, and copying the...

Invoke OnClientClick of button in code behind

c#,asp.net,asp.net-webpages
I have an button in my aspx web page, which should be 'clicked' in my code behind c# code. The OnClientClick method then call a JS confirm dialog box and so the btn_Click function only get executed when user click 'OK'... This is my code so far: Variante 1 aspx:...

Kendo Scheduler Datasource for multiple input field

json,kendo-ui,kendo-scheduler
In following example - http://dojo.telerik.com/IqIYI/5 - I am trying to understand how the data should be saved in my DB (and hence fed to the scheduler). This is my custom edit template. <script id="editor" type="text/x-kendo-template"> <h3>Edit meeting</h3> <p> <label>Title: <input name="title" /></label> </p> <p> <label>Start: <input data-role="datetimepicker" name="start" /></label> </p>...

owlCarousel not calculating height in accordion on page resize

accordion,owl-carousel
I am using owlCarousel inside an accordion. Every thing is fine until i resize the window. After resizing if the accordion was already opened it looks perfect but if it was closed during resize the carousel height goes to 0. I have tried to use .refres() method of owl carousel...

JVM: Invalid index 1 in LocalVariableTable

java,jvm,java-bytecode-asm
I am trying to compile the following code using a custom compiler: public static void main([String] args) { long i = 2L i *= 2L System out println i } The result of the compilation is, when using javap, this Bytecode: public static void main(java.lang.String[]); descriptor: ([Ljava/lang/String;)V flags: ACC_PUBLIC, ACC_STATIC...

Add border-bottom property css

css
I am currently applying the following css to a div when I hover my mouse on: border-bottom: 10px solid; The problem is that all the text contained in the div is shifted upwards by 10px. How can I prevent this from happening? EDIT: It needs to be compatible with IE8+...

Uncaught TypeError: Cannot read property 'navigate' of undefined

backbone.js,requirejs
So I developed a simple CRUD program from the tutorial video of backbonejs.org and the code worked fine. Now I'm trying to implement the code in requirejs but it shows following error in the following code: - define([ 'jquery', 'underscore', 'backbone', 'router', 'models/Customers/Customer', 'helper/Serialize' ], function ($, _, Backbone, Router,...

error logging and profiling web application wise in tomcat 7

java,tomcat
I have deployed two web application in tomcat 7 on windows 7 machine. after sometime of use any one of application throws java.lang.OutOfMemoryError: PermGen space error. after 2-3 mins another application also stops to respond. So I started looking in tomcat 7 error log file tomcat7-stderr.xxx.log , I found log...

Mixed language framework

ios,objective-c,swift,frameworks
I have a framework (let's call it MyKit) written in Objective-C that I'm extending with some Swift classes. I'm trying to get my head around it using this documentation: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_77 As far as I understand, I'm not supposed to have a bridging header class, and instead put all my includes...