Adi Adi

1

votes
2

answer
5k

views

Java: SAX Schema validation

I've following two schema's. Master.xsd and Child.xsd Child.xsd is imported by the Master.xsd. Master file has target namespace 'pub'. Child file no such namespace. When I try to validate xml with Master.xsd, I get error org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'author' t...
adi
1

votes
0

answer
9

views

Facebook javascript api calls stopped being sent

We have a website using Facebook login. 4 days ago, without performing any change, the login button stopped functioning. The call to FB.init works well using: function initFB() { FB.init({ appId: ufm_config.fbAppId, cookie: true, oauth: true, xfbml: true, logging: true, autoLogAppEvents: true, frict...
adi ohaion
0

votes
0

answer
23

views

grouping sales aggregate by month using SQLite sandbox in Julia

I am using the SQLite package in Julia. I need to aggregate the sum of sales by months. I have 3 tables Order, Order items and products. I have tried a few queries but nothing seems to work. DataFrame(SQLite.Query(acme, """select strftime('%m',OrderDate)as month, sum(price*quantity) as sales from...
adi
0

votes
2

answer
26

views

For loop in python while updating multiple list indexes?

I am a little bit new to python. I have completed my program of having a quiz of 15 questions, get 5 random of the 15 and print questions one by one to the user. Each question has 4 possible answers. The program works fine but instead of writing a block of code for each question I would like to loo...
Adi
0

votes
0

answer
18

views

onNewToken() is not called

I was trying to get the FCM working in my app in the past few days, and I saw that the onTokenRefreshed() function and FirebaseInstanceIdService in general, is deprecated. So I followed some firebase documentations and tutorials online, but none of them seemed to be working for me. My MyFirebaseMess...
Adi Harel
1

votes
1

answer
325

views

Can I create widgets for Notification Center in iOS without jailbreak?

I want to create a widget in NC with some toggles for airplane, wifi, bluetooth, etc. without jailbreak, is that possible?
Adi
1

votes
2

answer
1.6k

views

IBM Worklight Using Multiple HTML Files

I am new to IBM Worklight . I have been using Android from past 1 year. I liked Worklight a lot and I feel I can do a lot more with it. I want to develop the app/game in HTML 5 using Worklight with Eclipse IDE. So I would like to know how to link all the required html,js and css files in one Worklig...
adi
1

votes
3

answer
93

views

Parellel.ForEach error

I have an array of threads which i want run in simultaneous/parallel but i get "NullReferenceException" var t = new Thread[6]; t[0] = new Thread(() => DoSomething0()); t[1] = new Thread(() => DoSomething1()); t[2] = new Thread(() => DoSomething2()); t[3] = new Thread(() => DoSomething3()); t[4] = ne...
adi sba
1

votes
2

answer
2.1k

views

window.opener not returning value to the right textbox

the Html code : the jquery code to open child window: $("#pilihItem").click(function(){ var id = 1; var name = $(this).prev().attr("name"); var url = "../formItem.php?id=" + id + "&name=" + name; window.open(url, 'Pilih Item', 'location=1,status=1,scrollbars=1,resizable=no,width=800,h...
adi res
1

votes
1

answer
1.4k

views

Does using volatile to publish immutable objects are safe?

Recently I read "Java concurrency in practice" Section --> "3.4.2 Example: Using volatile to publish immutable objects". However; I can't quietly understand it. Here is the situation! Immutable object is: @Immutable class OneValueCache { private final BigInteger lastNumber; private final BigInteger...
Morteza Adi
1

votes
1

answer
1.3k

views

Comparing variables in jquery

I'm using simple jQuery to compare two variables, but everytime it is yielding false result. Here is the code piece: var fromIM = $("#passwordFroma").val(); loadContent(passwordValentered); var encrypt = document.getElementById("prtCnt").value; alert("ajax call " + encrypt); alert(encrypt == fromIM)...
Adi
1

votes
1

answer
365

views

Controller filenames starting with P cause Routing problems

I recently created a controller called PublishBannerController.php It was a cut and paste of a previous Controller with all the various parts adjusted accordingly. The only problem is, I get this error when I try and load it: FatalErrorException: Error: Class 'Me\MyBundle\Controller?ublishBannerCont...
Adi
1

votes
2

answer
1.5k

views

How can I activate an AutoHotkey script using JavaScript?

I am developing a Chrome extension to help automate tasks. I have reached the point where I need my extension to trigger some AutoHotkey scripts. Is there any way I can trigger an AutoHotkey using JavaScript? (I also use jQuery)
Adi Ulici
1

votes
2

answer
550

views

Make a one word command for my script to use in ubuntu terminal

I have a script /home/user/tde.sh I want to make a one work command that will run this script when I type it into a terminal. So if I write "tetras" in a terminal window it will run my /home/user/tde.sh. How can I achieve this in ubuntu? P.S. This is to help me achieve a desktop environment goal as...
Adi Helio
1

votes
3

answer
153

views

How to track objects being cleared by JAVA GC in NetBeans?

How can I see the objects being cleared during a Java GC Cycle in NetbBeans ? Also is there a way to know when the GC is triggered when I am running my application ? Thanks a lot for your responses and time.
Adi
1

votes
1

answer
14.3k

views

How to save the pdf file generated into mysql database in java

I have a java class which is generating pdf file using itext library .Now as per my need i have to save this pdf file generated into mysql database table but i have no idea how to do it.. My concern is:... 1.what datatype i can give in mysql column of pdf table to save pdf file.. 2.Which query will...
Adi
1

votes
2

answer
511

views

Does ServletContextListener invokes the method called each time machine reboots

Actually i have the requirement to execute a method which takes hours to complete on every machine reboot.I have deployed my web application on apache tomcat and i have enabled automatic start of Apache tomcat.For this I have called a method in ServletContextListener contextInitialized in a simple j...
Adi
1

votes
3

answer
999

views

Google map markers are disappearing instantly. How to make a marker remain constant?

I am adding markers on my map by fetching user locations stored in the remote server. The locations are displayed but within 3 seconds, the marker disappears. Any solution to this?? Below is my complete code. protected void onPostExecute(Void result) { super.onPostExecute(result); for(Us...
void Adi
1

votes
1

answer
431

views

How to show 2nd row on Data in Next Button Click in C# and XML database using LINQ

i am making Questions/Answer app for windows phone 8 using C# XAML and LINQ2XML.I have database of question and answers in xml included in project.And I want to fetch only single record of rows every time button is clicked and showing another record only when NEXT button is clicked so i am trying t...
Adi
1

votes
3

answer
48

views

Table not adding to panel on Action

I have Jtable that I want to add to the main JFrame when a MenuItem is triggered, but the problem is that will not show. If I add the table to panel from the beginning it shows, but I need it to show when the action occures. Here is the main class that creates the frame(I removed several items which...
adi
1

votes
2

answer
560

views

TCP/IP Socket is not reading data from machine when running as Windows Service in c#

I have a simple TCP/IP program to read data from a machine and write it into text file. I want to run it as Windows Service so that data gets written into text file continuously with out any intervention. Now when I try to run the program under debug mode of Visual Studio, it is reading the data f...
Adi
1

votes
2

answer
73

views

Does garbage collector free memory on setting _globalObject = new() multiple times

i am calling setABC(id) on click multiple times. MyClass _globalObject; setABC(id) { _globalObject = new MyClass(id); } Does the garbage collector destroys old object from memory and assign new object to _globalObject or it just create a new object and assign to _globalObject, consuming memory every...
ADi
1

votes
2

answer
1.1k

views

JQuery Datatable pagination with only the results for per page

The followings is the code for paginated datatable in my JSP: $(document).ready( function() { $('#paginatedTable').dataTable( { "bServerSide" :true, "sAjaxSource" :"/JQueryPagination/Myservlet", "bProcessing" :false, "sPaginationType" :"full_numbers", "bJQueryUI" :false, "aoColumns" : [ { "mDataProp...
Adi
1

votes
5

answer
205

views

How to Read Substrings based on Length of the String in C#

I have a String which contains a substrings One of them is "1 . 2 To Other Mobiles" and other is "Total".Now as per my requirement i have to read the Contents between first substring i.e ."1 . 2 To Other Mobiles" and "Total".I am doing it by following code in c#. int startPosition = currentText.Inde...
Adi
1

votes
3

answer
92

views

Can I change the Contents of the website after it gets deployed on IIS

I have a website in asp.net which contains a User Input form page where user can enter various details like Name, Id, Contact No, Address etc. Now as per my requirement I have to make this webpage generic such that in future if the Client wants to change the Name with Employee Name, Id to wwid, Cont...
Adi
1

votes
1

answer
810

views

Encoding with ffmpeg: video quality drops

I'm trying to encode a set of pictures into a video with ffmpeg. I'm new to this stuff, but I managed to get it work. I have only one problem: the first second or two of video look good but as the time goes the video quality keeps dropping and dropping. At the end (it's a video of about 16 seconds)...
Adi Ulici
1

votes
1

answer
43

views

Why does function expecting type alias input does not typechecks if I pass undelying type?

In the following code, why is the compiler not able to infer that x1 is immutable when passed to function imSeq. def imSeq(e: scala.collection.immutable.Seq[Int]) = e.foreach(println) def mSeq(e: Seq[Int]) = e.foreach(println) scala> val x1 = Seq(1, 2, 3) x1: Seq[Int] = List(1, 2, 3) scala> x1.isIn...
Adi
1

votes
3

answer
144

views

Getting Return Type of Callable Type in VS2010

I have a template class with a callable type-parameter . I know that Callable indeed creates a callable object, and is often a lambda. In my particular case, I also know the number (arity) and type of arguments (just one). How can I get the return type of this callable type Callable on VS2010?
Adi Shavit
1

votes
2

answer
7.3k

views

Groovy remove duplicate from list using unique function

I'm using soapui groovy script. I want to remove the duplicate from a list, using the next code: def myStr = "aaaa ; bbbb ; ccccc" def myList = myStr.split(";") myList = myList.unique() but when i tun the code i get exception: No signature of method: [Ljava.lang.String;.unique() is applicable for a...
Adi Mor
1

votes
2

answer
468

views

Symfony2 Best Practices confusion

I was going through the Symfony2 best practices and got confused on two things: 1 - Annotation usage - It says that for Routing and Cache we should use Annotations. But, I prefer to use annotations for ORM & Validation and YAML for Routing (one single file for all routes). How it is a bad practice?...
Adi
1

votes
4

answer
7.8k

views

Implementing a Read More link in React.js

I am trying to implement a Read More link, which expands to show more text after a click. I am trying to do this the React way. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown pr...
1

votes
1

answer
159

views

Chrome extension equivalent for firefox add-on sidebar

I am trying to create chrome extension that will create floating overlay (static one that dose not refresh), Similar to firefox add-on "ui sidebar" Is there any way to maintain iframe like overlay that wont be effected by the page, and wont be reloaded when the tab reloads.
Adi Darachi
0

votes
0

answer
8

views

Solidity - How to revert any token transfer from Smart Contract fallback?

I have a problem regarding how the smart contract rejects erc20 token transactions that do not use the depositToken function from the smart contract. here is the code that I have : pragma solidity >0.4.99 mapping (address => uint256)) private _balances; constructor() public { owner = msg.sender; }...
1

votes
1

answer
1.2k

views

Determine whether the selected index was changed or an autopostback event was triggered, in sections of the code-behind other than the event handler

I have an ASP DropDownList control with the AutoPostBack property set to true. When the user changes the selection, the form posts back as expected. I want to know how to determine, in the code-behind, whether the page posted back for this specific reason. I know that I can define an event handler...
Adi Inbar
1

votes
3

answer
132

views

What are the implementaion changes on Java 8 which can cause wrong outcome to codes written in Java 7?

We recently decided to migrate our solution from java 7 to 8. However at the first step we found that there are some implementation changes in java 8 like String.split() method Here that can cause problem to codes written in Java 7!! we rolled baked our project to Java 7 for now to investigate more...
Morteza Adi
2

votes
3

answer
3.8k

views

jQuery mobile ajax navigation

I am just getting my teeth into jQuery mobile (and so far it looks really interesting). I read a great tutorial on elated.com, one part of which was about page transitions/ajax navigation. This looks great (on my iPhone) but if you look at the source it's all flat html on the same page. What i want/...
Adi
1

votes
3

answer
1.2k

views

How to foreach multidimensional array with key value

I have a multidimensional array with key value. I want to loop the data in that array but I don't know how. This is my array: $myArray= Array ( '134' => Array ( '1138' => Array ( 'id' => 1138, 'qty' => 1, 'price' => 4900000, 'name' => 'Pioneer AVH X5850BT Head Unit Double Din 7Inch', 'options'...
Dimas Adi Andrea
2

votes
2

answer
4.7k

views

Spring Security intercept-url is not matching Wildcard

I try to implement security for my application using spring security. I intercept page using intercept-url, for example: at the first time i try to access the log for anonymous user using url: localhost/projectname/logList and the page automatically redirect to login page but when I try access log p...
Adi Sembiring
2

votes
4

answer
1.2k

views

jQuery wrap each list in a ul tag

Without going into details, I have the following jQuery code: $("nav ul ul").each(function () { var navitems = $(this).html(); alert(navitems); }); I knopw .html uses InnerHTML so the alerts are all xxxxx xxxxx But how can edit the jQuery so the alerts are like xxxxx xxxxx
Adi
1

votes
3

answer
3.5k

views

Rounding Oracle SYSDATE to the nearest hour

Supposing the current SYSDATE is 03-APR-17 03.35.49, my query would need to get values between: a. SYSDATE rounded to nearest passed hour (in this case 03.00.00) b. a minus 1 hour = 02.00.00 I have tried and found that using "-1/24" returns the date time with an hour subtracted. Kinda new to Oracle...
Adi

View additional