Daily Archives

Articles indexed Wednesday July 3 2013

Page 8/14 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Improving performance of a particle system (OpenGL ES)

    - by Jason
    I'm in the process of implementing a simple particle system for a 2D mobile game (using OpenGL ES 2.0). It's working, but it's pretty slow. I start getting frame rate battering after about 400 particles, which I think is pretty low. Here's a summary of my approach: I start with point sprites (GL_POINTS) rendered in a batch just using a native float buffer (I'm in Java-land on Android, so that translates as a java.nio.FloatBuffer). On GL context init, the following are set: GLES20.glViewport(0, 0, width, height); GLES20.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); GLES20.glEnable(GLES20.GL_CULL_FACE); GLES20.glDisable(GLES20.GL_DEPTH_TEST); Each draw frame sets the following: GLES20.glEnable(GLES20.GL_BLEND); GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA); And I bind a single texture: GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureHandle); GLES20.glUniform1i(mUniformTextureHandle, 0); Which is just a simple circle with some blur (and hence some transparency) http://cl.ly/image/0K2V2p2L1H2x Then there are a bunch of glVertexAttribPointer calls: mBuffer.position(position); mGlEs20.glVertexAttribPointer(mAttributeRGBHandle, valsPerRGB, GLES20.GL_FLOAT, false, stride, mBuffer); ...4 more of these Then I'm drawing: GLES20.glUniformMatrix4fv(mUniformProjectionMatrixHandle, 1, false, Camera.mProjectionMatrix, 0); GLES20.glDrawArrays(GLES20.GL_POINTS, 0, drawCalls); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); My vertex shader does have some computation in it, but given that they're point sprites (with only 2 coordinate values) I'm not sure this is the problem: #ifdef GL_ES // Set the default precision to low. precision lowp float; #endif uniform mat4 u_ProjectionMatrix; attribute vec4 a_Position; attribute float a_PointSize; attribute vec3 a_RGB; attribute float a_Alpha; attribute float a_Burn; varying vec4 v_Color; void main() { vec3 v_FGC = a_RGB * a_Alpha; v_Color = vec4(v_FGC.x, v_FGC.y, v_FGC.z, a_Alpha * (1.0 - a_Burn)); gl_PointSize = a_PointSize; gl_Position = u_ProjectionMatrix * a_Position; } My fragment shader couldn't really be simpler: #ifdef GL_ES // Set the default precision to low. precision lowp float; #endif uniform sampler2D u_Texture; varying vec4 v_Color; void main() { gl_FragColor = texture2D(u_Texture, gl_PointCoord) * v_Color; } That's about it. I had read that transparent pixels in point sprites can cause issues, but surely not at only 400 points? I'm running on a fairly new device (12 month old Galaxy Nexus). My question is less about my approach (although I'm open to suggestion) but more about whether there are any specific OpenGL "no no's" that have leaked into my code. I'm sure there's GL master out there facepalming right now... I'd love to hear any critique.

    Read the article

  • C# Multi CheckboxList update inserts checked records but doesn't delete unchecked records

    - by DLL
    I have a multi checkboxlist on a formview. Both use queries in a tableadapter. I'm using VS 2012. When the user updates the form, I use the following code to update the checkbox data. If a user checks a new box, a new record is inserted correctly, however if the user unchecks a box the existing record is not deleted. The delete query works fine if I run it from the query builder in the table adapter, it's reaching the expected line in the code correctly, all values are correct and I receive no errors. I use a similar query to delete records when the form level data is deleted which works fine. The very last line is the one that doesn't work. Query: DELETE FROM [SLA_Categories] WHERE (([SLA_ID] = @SLA_ID) AND ([Choice_ID] = @Choice_ID)) protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { if (FormView1.DataKey.Value != null) { Categs = (CheckBoxList)FormView1.FindControl("CheckBoxList1"); CurrentSLA_ID = (int)FormView1.DataKey.Value; } if (CurrentSLA_ID > 0) { foreach (ListItem li in Categs.Items) { // See if there's a record for the current sla in this category int CurrentChoice_ID = Convert.ToInt32(li.Value); SLADataSetTableAdapters.SLA_CategoriesTableAdapter myAdapter; myAdapter = new SLADataSetTableAdapters.SLA_CategoriesTableAdapter(); int myCount = (int)myAdapter.FindCategoryBySLA_IDAndChoice_ID(CurrentSLA_ID, CurrentChoice_ID); // If this category is checked and there is not an existing rec, insert one if (li.Selected == true && myCount < 1) { // Insert a rec for this sla myAdapter.InsertCategory(CurrentChoice_ID, CurrentSLA_ID); } // If this category is unchecked and there is and existing rec, delete it if (li.Selected == false && myCount > 0) { // Delete this rec myAdapter.DeleteCategoryBySLA_IDAndChoice_ID(CurrentChoice_ID, CurrentSLA_ID); } } } }

    Read the article

  • How to bring out checboxes based on drop down list selection from DB

    - by user2199877
    I got stuck again. Can't overcome this step: loop through (in a form of checkboxes) pallets based on the lot drop down list selection, so it can be further submitted to complete the table. Please, please help. So, basically, first submit button (drop down menu) brings into the table lot number and description and also checkboxes to choose pallets. Second submit button (checboxes) brings into the table pallets numbers and weights. Thank you for any help. <?php mysql_connect('localhost','user',''); mysql_select_db('base'); $query="SELECT DISTINCT lot_number FROM pl_table"; $result=mysql_query($query); ?> <form action="" method="POST"> <select name="option_chosen"> <option>-- Select lot --</option> <?php while(list($lot_number)=mysql_fetch_row($result)) { echo "<option value=\"".$lot_number."\">".$lot_number."</option>"; } ?> </select> <input type='submit' name='submitLot' value='Submit' /> </form> <!-- need help here <h4>-- Select pallets --</h4> <form action="" method="POST"> <input type='submit' name='submitPal' value='Submit'/> </form> --> <table border="1" id="table"> <tr> <th width=80 height=30>Lot<br/>number</th> <th width=110 height=30>Description</th> <th width=90 height=30>Pallet<br/>number</th> <th width=60 height=30>Net</th> <th width=60 height=30>Gross</th> </tr> <?php if($_SERVER['REQUEST_METHOD'] =='POST') {$option_chosen=$_POST['option_chosen']; $query="SELECT * FROM pl_table WHERE lot_number='$option_chosen'"; $run=mysql_query($query); $row=mysql_fetch_array($run, MYSQLI_ASSOC); echo "<tr><td>".''."</td>"; echo "<td rowspan='5'>".$row['descr']."</td>"; echo "<td><b>".'Total weight'."<b></td>"; echo "<td>".''."</td><td>".''."</td></tr>"; echo "<td>".$row['lot_number']."</td>"; echo "<td colspan='3'>".''."</td>"; //This to be echoed when "select pallets" submited //echo "<tr><td>".$row['lot_number']."</td>"; //echo "<td>".$row['pallet_number']."</td>"; //echo "<td>".$row['net']."</td><td>".$row['gross']."</td></tr>"; } ?> </table> the table +--------------------------+-------------------------+---------+-------+ | id | lot_number | descr | pallet_number | net | gross | +--------------------------+-------------------------+---------+-------+ | 1 | 111 | black | 1 | 800 | 900 | | 2 | 111 | black | 2 | 801 | 901 | | 3 | 111 | black | 3 | 802 | 902 | | 4 | 222 | white | 1 | 800 | 900 | | 5 | 222 | white | 2 | 801 | 901 | | 6 | 222 | white | 3 | 802 | 902 | +--------------------------+-------------------------+---------+-------+

    Read the article

  • Background Image comes up as white when displayed using Javascript

    - by AndroidNewbie
    I am trying to change the background image whenever the document is loaded, and when it hits this point: document.body.style.backgroundImage="url('../images/mobile-bckground.png')"; The page simply makes the background plain white. It is displayed like this in my javascript: $(function() { document.body.style.backgroundImage="url('../images/mobile-bckground.png')"; }); I have verified the image is in the right location, why is it doing this?

    Read the article

  • Combining multiple queries in one in Access

    - by Arlen Beiler
    I have two queries that I want to combine into one in Microsoft Access 2003. SELECT AttendanceQuery.AttendDate, Count(*) AS Absent FROM AttendanceQuery WHERE (((AttendanceQuery.Present)=False)) GROUP BY AttendanceQuery.AttendDate; SELECT AttendanceQuery.AttendDate, Count(*) AS Enrollment FROM AttendanceQuery GROUP BY AttendanceQuery.AttendDate; The one shows the total records for each date, the other shows the ones that are marked absent.

    Read the article

  • return 0 with sql query instead of nothing

    - by user1202606
    How do I return a 0 with as Responses with the PossibleAnswerText if count is 0? Right now it won't return anything. select COUNT(sr.Id) AS 'Responses', qpa.PossibleAnswerText from CaresPlusParticipantSurvey.QuestionPossibleAnswer as qpa join CaresPlusParticipantSurvey.SurveyResponse as sr on sr.QuestionPossibleAnswerId = qpa.Id where sr.QuestionPossibleAnswerId = 116 GROUP BY qpa.PossibleAnswerText

    Read the article

  • Change the colour of ablines on ggplot

    - by Sarah
    Using this data I am fitting a plot: p <- ggplot(dat, aes(x=log(Explan), y=Response)) + geom_point(aes(group=Area, colour=Area))+ geom_abline(slope=-0.062712, intercept=0.165886)+ geom_abline(slope= -0.052300, intercept=-0.038691)+ scale_x_continuous("log(Mass) (g)")+ theme(axis.title.y=element_text(size=rel(1.2),vjust=0.2), axis.title.x=element_text(size=rel(1.2),vjust=0.2), axis.text.x=element_text(size=rel(1.3)), axis.text.y=element_text(size=rel(1.3)), text = element_text(size=13)) + scale_colour_brewer(palette="Set1") The two ablines represent the phylogenetically adjusted relationships for each Area trend. I am wondering, is it possible to get the ablines in the same colour palette as their appropriate area data? The first specified is for Area A, the second for Area B. I used: g <- ggplot_build(p) to find out that the first colour is #E41A1C and the second is #377EB8, however when I try to use aes within the +geom_abline command to specify these colours i.e. p <- ggplot(dat, aes(x=log(Explan), y=Response)) + geom_point(aes(group=Area, colour=Area))+ geom_abline(slope=-0.062712, intercept=0.165886,aes(colour='#E41A1C'))+ geom_abline(slope= -0.052300, intercept=-0.038691,aes(colour=#377EB8))+ scale_x_continuous("log(Mass) (g)")+ theme(axis.title.y=element_text(size=rel(1.2),vjust=0.2), axis.title.x=element_text(size=rel(1.2),vjust=0.2), axis.text.x=element_text(size=rel(1.3)), axis.text.y=element_text(size=rel(1.3)), text = element_text(size=13)) + scale_colour_brewer(palette="Set1") It changes the colour of the points and adds to the legend, which I don't want to do. Any advice would be much appreciated!

    Read the article

  • Why does this IF statement fail?

    - by ChosenOne
    If variable path is empty, and editor.Text is not empty, the SaveFileDialog should be displayed. Now, why on earth is this damn thing failing??? I have tried this with many different variations of code with the same result: FAIL: if(path.Length >= 1) // path contains a path. Save changes instead of creating NEW file. { File.WriteAllText(path, content); } else { // no path defined. Create new file and write to it. using(SaveFileDialog saver = new SaveFileDialog()) { if(saver.ShowDialog() == DialogButtons.OK) { File.WriteAllText(saver.Filename, content); } } } At the top of code file I have: path = String.Empty; So why the heck it this failing every single time, even after trying all of the below variations? if(path.Length > 1) // path contains a path. Save changes instead of creating NEW file. { File.WriteAllText(path, content); } else { // no path defined. Create new file and write to it. using(SaveFileDialog saver = new SaveFileDialog()) { if(saver.ShowDialog() == DialogButtons.OK) { File.WriteAllText(saver.Filename, content); } } } and if(String.IsNullOrEmpty(path)) // path contains a path. Save changes instead of creating NEW file. { File.WriteAllText(path, content); } else { // no path defined. Create new file and write to it. using(SaveFileDialog saver = new SaveFileDialog()) { if(saver.ShowDialog() == DialogButtons.OK) { File.WriteAllText(saver.Filename, content); } } } and if(String.IsNullOrWhiteSpace(path)) // path contains a path. Save changes instead of creating NEW file. { File.WriteAllText(path, content); } else { // no path defined. Create new file and write to it. using(SaveFileDialog saver = new SaveFileDialog()) { if(saver.ShowDialog() == DialogButtons.OK) { File.WriteAllText(saver.Filename, content); } } } This is making me very angry. How could this fail? Setting a break point reveals that path is definitely null/"".

    Read the article

  • Sorting a meta-list by first element of children lists in Python

    - by thismachinechills
    I have a list, root, of lists, root[child0], root[child1], etc. I want to sort the children of the root list by the first value in the child list, root[child0][0], which is an int. Example: import random children = 10 root = [[random.randint(0, children), "some value"] for child in children] I want to sort root from greatest to least by the first element of each of it's children. I've taken a look at some previous entries that used sorted() and a lamda function I'm entirely unfamiliar with, so I'm unsure of how to apply that to my problem. Appreciate any direction that can by given Thanks

    Read the article

  • meaning of (\/?) in regex / is (\w+)([^>]*?) a redundancy?

    - by thomas
    this regular expression should match an html start tag, I think. var results = html.match(/<(\/?)(\w+)([^>]*?)>/); I see it should first capture the <, but then I am confused what this capture (\/?) accomplishes. Am I correct in reasoning that the ([^>]*?)> searches for every character except > = 0 times? If so, why is the (\w+) capture necessary? Doesn't it fall within the purview of [^>]*?

    Read the article

  • Checkbox in an email

    - by Austin
    I am creating an email using the c# MailMessage and I am trying to add a checkbox that doesn't need to be clicked. The checkboxes will be used for a checklist of what to bring to an event (like a packing list). I have: MailMessage objEmail = new MailMessage(); objEmail.From = new MailAddress("[email protected]"); objEmail.To.Add(new MailAddress("[email protected]")); objEmail.CC.Add(new MailAddress("[email protected]")); objEmail.Bcc.Add(new MailAddress("[email protected]")); objEmail.Subject = "Packing list!"; objEmail.IsBodyHtml = true; objEmail.Body = @"<div width=""800px""> <h3>WHAT TO BRING</h3> <form> <input type=""checkbox"" name=""item"" value=""shirt"">Shirt<br> <input type=""checkbox"" name=""item"" value=""shoes"">Shoes </form></div>"; but when I send the email the checkboxes do not appear in the list. Output in outlook using outlook.com: WHAT TO BRING I have a bike I have a car Output in outlook using Microsoft Outlook: WHAT TO BRING [ ]I have a bike [ ]I have a car Output in outlook using hotmail.com: WHAT TO BRING I have a bike []I have a car So the problem is with the mail client but it is inconsistent what the problem is. I s there any way to make a consistent output? Is there a way with html that works to create the checkboxes or do I just need to include images of a checkbox? Thanks in advance.

    Read the article

  • How to order a ls output by suffix?

    - by Luca Borrione
    Having a ls output like GGGG_3.0.3_98/ GGGG_3.0.3_d_100/ GGGG_3.0.3_d_101/ GGGG_3.0.3_d_99/ GGGG_3.0.4_104/ GGGG_3.0.4_105/ GGGG_3.0.4_106/ GGGG_3.0_87/ GGGG_3.0_89/ GGGG_3.0_90/ GGGG_3.0_91/ GGGG_3.0_92/ GGGG_3.0_93/ SSS_2.2.3_01/ SSS_2.2.3_02/ SSS_2.2.3_03/ TTT_2.8.3_29/ how to get the elements ordered by suffix? Also, is there any quick command I can use to know that 106 is the last suffix in this example? Sorry: it wasn't clear that "the suffix" in the given example is everything following the final underscore.

    Read the article

  • convert std object class to comma seperated string

    - by Kwaasi Djin
    I have an std class object from twitter and i would like to take the ids array values and put them in a php variable $ids where $ids = (15761916,30144785,382747195,19399719). I imagine using a for loop and using phps implode but i'm not sure how to go about it. stdClass Object ( [ids] => Array ( [0] => 15761916 [1] => 30144785 [2] => 382747195 [3] => 19399719 ) [next_cursor] => 0 [next_cursor_str] => 0 [previous_cursor] => 0 [previous_cursor_str] => 0 )

    Read the article

  • Find all substrings of a string - StringIndexOutOfBoundsException

    - by nazar_art
    I created class Word. Word has a constructor that takes a string argument and one method getSubstrings which returns a String containing all substring of word, sorted by length. For example, if the user provides the input "rum", the method returns a string that will print like this: r u m ru um rum I want to concatenate the substrings in a String, separating them with a newline ("\n"). Then return the string. Code: public class Word { String word; public Word(String word) { this.word = word; } /** * Gets all the substrings of this Word. * @return all substrings of this Word separated by newline */ public String getSubstrings() { String str = ""; int i, j; for (i = 0; i < word.length(); i++) { for (j = 0; j < word.length(); j++) { str = word.substring(i, i + j); str += "\n"; } } return str; } But it throws exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) I stuck at this point. Maybe, you have other suggestions according this method signature public String getSubstrings(). How to solve this issue?

    Read the article

  • how to set href value on all elements with a given ID?

    - by dferraro
    I have several anchor tags on a page with the same id of 'hrefCompare'. I need to dynamically set the value of the href attribute on ALL of these a tags. I am currently trying to do this: $("#hrefCompare").attr("href", "foobar.com"); However, this only sets the very first anchor tag with that ID. there's 7 more on this page with the same id of 'hrefCompare'. How can I set all of the href values with that ID?

    Read the article

  • ISBNdb Retrieving and Managing Info

    - by Pierre Sylvestre
    Given a set of databases how can one you get information on a book with given price first (which consist of the average of a hidden list of prices coming from different web site) and followed by an optional second option that shows the list of the different web site with their page? To take an example given a query for ISBN 9785554443331 - it returns "Chemistry the central science 11 edition" : new:$50 used good condition:$35 used poor condition:$20 If the return does not match with our product list an option to "click here to visit our partner" appears and which returns: Atextbook: $10 Btextbook: $10 Ctextbook: $9 Dtextbook: $8.50 I understand that the first search would be done simultaneous on the web and our database to determine whether or not we have the book and the web to get the average of the price of a given list of web site. Thank you in advance for the help

    Read the article

  • Focus on background Music when in a call

    - by Developer
    I am developing an app. I need to play the music when i am in a call. But i am facing with the problem that whenever i try to play the music in a call it is not that much loud as it is when there is no call. Is there any way to control the background music when in a call. My music volume becomes softer when i am in a call but it becomes louder as soon as i end the call. final AudioManager mAudioManager = (AudioManager) ctx .getSystemService(AUDIO_SERVICE); final int originalVolume = mAudioManager .getStreamVolume(AudioManager.STREAM_MUSIC); mAudioManager .setStreamVolume( AudioManager.STREAM_MUSIC, mAudioManager .getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0); mp = new MediaPlayer(); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mAudioManager.setMode(AudioManager.MODE_NORMAL); Class audioSystemClass = Class .forName("android.media.AudioSystem"); Method setForceUse = audioSystemClass.getMethod( "setForceUse", int.class, int.class); // First 1 == FOR_MEDIA, second 1 == FORCE_SPEAKER. To go // back to the default // behavior, use FORCE_NONE (0). setForceUse.invoke(null, 1, 1); this is my code.

    Read the article

  • Retrieve jquery-ui dialog's div

    - by Hikari
    When we apply $().dialog() in an object, jquery-ui puts it inside a <div class="ui-dialog ui-widget">, with a <div class="ui-dialog-titlebar ui-widget-header"> before it. After the creation of this dialog around the main object, how can we get that ui-dialog object so that we can execute other JavaScript commands in it? The best I could do was use .parent(".ui-dialog") in the main object, is there a better way to do it?

    Read the article

  • is it possible to turn off vdso on glibc side?

    - by heroxbd
    I am aware that passing vdso=0 to kernel can turn this feature off, and that the dynamic linker in glibc can automatic detect and use vdso feature from kernel. Here I met with this problem. There is a RHEL 5.6 box (kernel 2.6.18-238.el5) in my institution where I only have a normal user access, probably suffering from RHEL bug 673616. As I compile a toolchain of linux-headers-3.9/gcc-4.7.2/glibc-2.17/binutils-2.23 on top of it, gcc bootstrap fails in cc1 in stage2 cannnot be run Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaaaca6eb in ?? () (gdb) info sharedlibrary From To Syms Read Shared Object Library 0x00002aaaaaaabba0 0x00002aaaaaac3249 Yes (*) /home/benda/gnto/lib64/ld-linux-x86-64.so.2 0x00002aaaaacd29b0 0x00002aaaaace2480 Yes (*) /home/benda/gnto/usr/lib/libmpc.so.3 0x00002aaaaaef2cd0 0x00002aaaaaf36c08 Yes (*) /home/benda/gnto/usr/lib/libmpfr.so.4 0x00002aaaab14f280 0x00002aaaab19b658 Yes (*) /home/benda/gnto/usr/lib/libgmp.so.10 0x00002aaaab3b3060 0x00002aaaab3b3b50 Yes (*) /home/benda/gnto/lib/libdl.so.2 0x00002aaaab5b87b0 0x00002aaaab5c4bb0 Yes (*) /home/benda/gnto/usr/lib/libz.so.1 0x00002aaaab7d0e70 0x00002aaaab80f62c Yes (*) /home/benda/gnto/lib/libm.so.6 0x00002aaaaba70d40 0x00002aaaabb81aec Yes (*) /home/benda/gnto/lib/libc.so.6 (*): Shared library is missing debugging information. and a simple program #include <sys/time.h> #include <stdio.h> int main () { struct timeval tim; gettimeofday(&tim, NULL); return 0; } get segment fault in the same way if compiled against glibc-2.17 and xgcc from stage1. Both cc1 and the test program can be run on another running RHEL 5.5 (kernel 2.6.18-194.26.1.el5) with gcc-4.7.2/glibc-2.17/binutils-2.23 as normal user. I cannot simply upgrade the box to a newer RHEL version, nor could I turn VDSO off via sysctl or proc. The question is, is there a way to compile glibc so that it turns off VDSO unconditionally?

    Read the article

  • Deployed Qt5 Application Doesn't Print or Show Print Dialog

    - by MustacheMcLimey
    I'm experiencing Qt4 to Qt5 troubles. In my application when the user clicks the print button two things should happen, one is that a PDF gets written to disk (which still works fine in the new version, so I know that some of the printing functions are working properly) and the other is that a QPrintDialog should exec() and then send to a connected printer. I see the dialog when I launch from my development machine. The application launches on the deployed machine, but the QPrintDialog never shows and the document never prints. I am including print support. QT += core gui network webkitwidgets widgets printsupport I have been using Process Explorer to see what DLLs the application uses on my development machine, and I believe that everything is present. My application bundle includes: {myAppPath}\MyApp[MyApp.exe, Qt5PrintSupport.dll, ...] {myAppPath}\plugins\printsupport\windowsprintersupport.dll {myAppPath}\plugins\imageformats[ qgif.dll, qico.dll,qjpeg.dll, qmng.dll, qtga.dll, qtiff.dll, qwbmp.dll ] The following is the relevant code snippet: void PrintableForm::printFile() { //Writes the PDF to disk in every environment pdfCopy(); //Paper Copy only works on my dev machine QPrinter paperPrinter; QPrintDialog printDialog(&paperPrinter,this); if( printDialog.exec() == QDialog::Accepted ) { view->print(&paperPrinter); } this->accept(); } My first thought is that the relevant DLLs are not being found come print time, and that means that my application file system is incorrect, but I have not found anything that shows me a different file structure. Am I on the right track or is there something else wrong with this setup?

    Read the article

  • jQuery animating scroll top to 0 not working on Windows Phone

    - by cgoddard
    I have written a website which has a function that scrolls the users view to the top of the page. The call in question is: $('html,body').animate({scrollTop:0}, 150, 'swing'); This works fine on all desktop browsers, but on Windows Phone, it only scrolls the user up about 180 pixels, then stops. I have tried replacing the function with: $('html,body').scrollTop(0); It snaps to the top on desktops, but it scrolls to the top on the phone. I believe this need for Internet Explorer Mobile to try to smoothly animate the scrolling, and is causing the issue. If this is the case (or if not, could someone correct me), how can I override this function to get the animation to work? EDIT Although its not ideal, it does seem to work in a limited capacity, I have replaced the scroll code with this: $('html,body').animate({scrollTop:0}, 150, 'swing', function() { $('html,body').scrollTop(0); }); But it would be good to know if there is an option to disable the smooth scrolling in Mobile IE programatically.

    Read the article

  • Java library for parsing command-line parameters?

    - by Mnementh
    I write a little command-line-application in Java. This application should work with a mix of parameters and commands, similar to svn. Examples app url command1 app url command2 --parameter2 -x app url command1 --param-with-argument argument app --parameter url command1 app --no-url command2 app --help Wanted Exists an easy-to-use library for Java Supports parsing of such command-lines (Bonus) Automatically creates an appropriate help

    Read the article

  • Mozilla Firefox 23 Will Block Mixed SSL Content

    - by Anirudha
    Originally posted on: http://geekswithblogs.net/anirugu/archive/2013/07/03/mozilla-firefox-23-will-block-mixed-ssl-content.aspxIf you have a site which is running on SSL and used content that make non-https request then you need to a bit worried. The default setting of Firefox 23 will block the content that called on non-https address and page is based on SSL. for example script using https://code.jquery.com/jquery-1.10.2.min.js will not work because code.jquery.com can not be reach on https. the cdn ajax.googleapis.com support SSL so you can try it. if you want to disable this settings you can modify it on about:config security.mixed_content.block_active_content change the value true to false and it will be disable (it’s just for example)

    Read the article

  • Building apps that work Together

    - by Tim Murphy
    Originally posted on: http://geekswithblogs.net/tmurphy/archive/2013/07/03/building-apps-that-work-together.aspx  Writing apps that stand alone will only get yon so far.  If your app can allow the user to leverage other applications and share data you Can have a real winner on your hands. Jake Sabulsky started off by explaining that you should be concentrating on the core functionality of your app and letting the framework take care of the features that users require these days.  This is implemented be leveraging contracts.  When Windows 8 was released it included the File, Share and Pickers contracts.  With the release of Windows 8.1 they have added the Contacts and Calendar contracts. There have been a number of improvements to the original contracts. The File URI contract will now automatically detect the size that a new windows should be opened and will also allow you to programmatically influence new window size.  The Share contract has been enhanced by allowing apps to always share screenshots and links to the app in the store. To my thinking the contracts are one of the most powerful features of Windows 8.  Take the time view this session and learn how to leverage them. Technorati Tags: BUILD 2013,Windows 8,Live tiles

    Read the article

  • Is this DoS attack

    - by Joyce Babu
    I am seeing a huge number of connections from a single IP. # netstat -alpn | grep :80 | grep 92.98.64.103 tcp 0 0 my.ip.address.x:80 92.98.64.103:45629 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:44288 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:48783 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:40531 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:54094 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:47394 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:43495 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:55429 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:42993 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:49542 TIME_WAIT - tcp 0 0 my.ip.address.x:80 92.98.64.103:54812 TIME_WAIT - There are 419 such lines. But I see only 1 request from 92.98.64.103 in my access log. Is this DoS attack?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14  | Next Page >