on-internet

"Media resource FILEPATH/FILENAME.mp4 could not be decoded." while trying to play h264 encoded files on Firefox 35

We use mp4 files using the h264 codec on our server to play videos. The files in FF prior to FF35 worked fine, they work in IE8+, and Chrome. In FF35 we now get the following message in the console Media resource FILEPATH/FILENAME.mp4 could not be decoded. If we then load the resource directly we get Video can't be played because the file is corrupt. Is there something we have to do to the mp4 files to get them working in FF35? This behavior has been replicated on FF35 on OS 10.6.8-10.9, Windows 7, and Windows 8.

Join the discussion →

How to set PDF file size using PdfDocument on Android

I have to convert some text and a small image into a PDF document on Android and for that I am using PdfDocument added in API 19. The thing with this is that the PDF generated by this one is about 3 times bigger (file size) than the one generated on iOS. Also, I tried to compress both Android and iOS PDF files with an online free compression tool and the results were: iOS: the compression couldn't do anything because was already compressed enough Android: the resulted PDF was the same as with the iOS one (about 3 times smaller) Even if I remove the image from the doc, the resulted Android PDF

Join the discussion →

Error creating bean with name 'org.springframework.security.filterChains

this is my dispatcher-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.sp

Join the discussion →

IEEE754 division precision

From IEEE754, I read [...] every operation [...] shall be performed as if it first produced an intermediate result correct to infinite precision and with unbounded range, and then rounded that result [...]. My understanding is when dividing the double 1.0108552519184509e+76 (0x4FB6593CEBC97CC5) by 4.1777521369084075e+147 (0x5E94E917A9CC65DC), the theoretical intermediate fraction part is (binary) 1.0001000110011011000100110000110101001010110111101110100000000000001... and should get rounded to (rounding mode "nearest") 1.0001000110011011000100110000110101001010110111101111 resulting in a quoti

Join the discussion →

R: for loop iteration with seq_along vectors of a list

consider the following code: listLength <- sample(1:10, 1) vectorLength <- sample(1:10, 1) x <- vector("list") for(i in 1:listLength){ x[[i]] <- sample(1:10, vectorLength) } transform <- function(x){ result <- vector("list") for(i in seq_along(x[[1]])){ temp <- vector("numeric") for(j in seq_along(x)){ temp <- c(temp, x[[j]][i]) } result[[i]] <- temp } return(result) } and finally y <- transform(x) x is a list of random length , the vector elements of x have a random, but always equal length. The transform function returns a new list y, which is a list of vectorLength with vectors of listLengt

Join the discussion →

Verify if a number X can be generated based on a combination of a series (a,b,c)

I'm going crazy trying to figure out a way to make a program that does not try every single combination. A simple example: I want to know if 11 can be generated by adding up numbers from the series (2,5,10,20), is there an easy way to do this without trying every single possibility? In this case we can do it with three 2s and one 5. Thanks

Join the discussion →

Illegal operand for constant expression

I'm trying to build a task, which must delve into some hierarchy, that can concisely compare different pins on a particular instance. In particular, I'd like to do something like the following: task check_expected; input integer pin; input [9:0] expected; integer i, j; reg [9:0] check; begin j = 0; for (i = 0; i < 20; i = i + 1) begin case (pin) 0: begin check[0] = test.inst[i].lane_0.PIN_FIRST; check[1] = test.inst[i].lane_1.PIN_FIRST; ... check[9] = test.inst[i].lane_9.PIN_FIRST; end 1: begin check[0] = test.inst[i].lane_0.PIN_SECOND; check[1] = test.inst[i].lane_1.PIN_SECOND; ... check[9] =

Join the discussion →

PHP GuzzleHttp. How to make a post request with params?

How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $client->post( 'http://www.example.com/user/create', array( 'email' => '[email protected]', 'name' => 'Test user', 'password' => 'testpassword' ) ); But I am getting the error: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with the message 'No method can handle the email config key'

Join the discussion →

Game maker refuses to compile and run game, with error message "Unable to find game"

I am currently doing a project in a fresh installation of Game Maker Studio, version 1.4.1499. When I attempt to build and run the project (using the run button, the run menu option, or by pressing F5), it comes up with the following output: Asset Compile finished: 11:07:49 AM ----------------------------------------------------------- executing C:\Users\User\AppData\Local\Temp\gm_ttt_64280\gm_ttt_91991\game.win ----------------------------------------------------------- "C:\Users\User\AppData\Roaming\GameMaker-Studio\Runner.exe" -game "C:\Users\Juggernaut\AppData\Local\Temp\gm_ttt_64280\gm_tt

Join the discussion →

The URI you submitted has disallowed characters error on codeigniter

I have a problem. I am using the uri->segment() method of codeigniter to catch a get variable with this string value: "Introducción e Interpretación Norma ISO 9001:2008" It's in spanish and when I send it via the url I get the error: "The URI you submitted has disallowed characters." if I remove the ":" from the string, it doesn't give me the error. This is what my config.php file has: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; Can anyone help me detect the source of this error? Thanks.

Join the discussion →

The content type application/xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8), WCF

I know this question has been asked a few times before, but the solutions given either don't work for me or I'm too ignorant to fully understand how to implement the solution. So, the website I am attempting to run runs off of a WCF client. Whenever a WCF service tries to be called (ie, any database search or edit), it comes up with this error The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024

Join the discussion →

Thread BLOCKED on org.apache.log4j.Category.callAppenders, but not waiting for any lock

My web application(delpoyed on weblogic) went down, when I check the jstack info, I found most threads are BLOCKED on a org.apache.log4j.spi.RootLogger. The thread owning this lock is also BLOCKED and stucked for at least 20min until i kill the process, but it's not waiting on any other lock, how does this happen? here is the jstack info: the BLOCKED thread owning lock <783b8910>, but not waiting on other locks: "[STUCK] ExecuteThread: '58' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=7 tid=02e45400 nid=86 lwp_id=7959740 waiting for monitor entry [61cff000] java.lang.Thread.

Join the discussion →

Can't pip install older version of Jinja2

I'm trying to pip install Jinja2==2.6 (current version is 2.7.3) but keep getting an error. I've made sure that it exists on pypi yet it still doesn't find it. If you want to see the pypi webpage click here $ pip install Jinja2==2.6 Collecting Jinja2==2.6 Could not find a version that satisfies the requirement Jinja2==2.6 (from versions: 2.7.3) No distributions matching the version for Jinja2==2.6

Join the discussion →

Loading progress animation like with batch scripting

i want to make such as loading indicator just like : installation is running... and those dots should be appear progressively and once they are three their number should be reinitialized to one dot and all happens in the same line. for this i've tried to mix code of two small scripts : the first plays continuestly the dots and the seconds makes a counter increase its value by echoing it in the same line. at the end i got this code which is the closest solution for what i want to achieve but still with a problem which is that when there are already three dots, the next row which has less number

Join the discussion →

Algorithm for path simplification and smoothing of 2D trajectories

I'm searching for an algorithm for path simplification and smoothing for 2D trajectories. So I have a ordered list of 2D points. These points should be simplified, e.g. with the Ramer–Douglas–Peucker algorithm. But the output must be smooth, so the resulting path should be constructed from Bezier curves or splines. Is there any modification of the Ramer–Douglas–Peucker algorithm which could handle this? I found a path simplification algorithm in the paper.js library, which does exactly what I'm searching for: http://paperjs.org/examples/path-simplification/ But I was not able to understand the

Join the discussion →

Unicode boxed character 字 not displaying correctly

To "quickly" display a boxed number (in HTML), I can use the character U+20E3 to achieve this effect: 3⃣1 (0033 20E3 0031) This should work to add a square frame around full-width CJK characters. However when I try the following to make the symbol for close-captioned broadcast: 字⃣ (5B57 20E3) The character is shifted to the left. This example can be found here. Why is this happening? Is this platform-dependent? Or did I misunderstand the purpose of the U+20E3 character?

Join the discussion →

Extracting data from RFID reader

i m working with a canteen management project (in a company). i would like to authenticate users through their ID Cards when put on a Rfid reader. I have surfed several sites but they are not upto what i want. My problem is , i am not able to extract the serial number from the ID cards put on the Rfid reader. Anyone. plz help me with this.. i m working with visual studio 2012 (windows application) and the language i am using is C#. My code is as follows: private void button1_Click(object sender, EventArgs e) { RFID = new SerialPort(); RFID.PortName = "COM1"; RFID.BaudRate = 9600; RFID.DataBits

Join the discussion →

Can I update timestamp column to a desired Value?

I have a table with a column having timestamp column. The table structure is something like this [Time] [timestamp] NOT NULL, When I insert in to this table using the following query insert into test(id,name) values(1,'john') Here I do not insert any value in Time column which is timestamp datatype but here some values are inserted automatically. So I want to know If I can set my own seried value in this column like 3600 for 1 hour or 7200 for 2 hours so some time values I tried like this update test set Time=7200 but it showed me the following error Cannot update a timestamp column. I tried b

Join the discussion →

Split bootstrap column in n rows with equal height, filling parent height

I'm quite new to Bootstrap, I'm struggling with the grid system while trying to reproduce the following template: In this example I have 3 columns: first columns holds some info/pictures. This column holds a lot of data. second column holds 3 (but potentially n) contact info (email, address, phone number, ...) third column holds some random info I'd like to split the 2nd column into 3 rows, with equal height. What I need to do is to vertically center these 3 rows in the 2nd column, and possibly expand their heights to fill the parent (2nd column) height. This is an example of what I've achieve

Join the discussion →

JPA lower() function on parameter

I have updated project from spring 3.2 to 4.1 and hibernate 4.2 to 4.3.7 and got interesting problem. I have query: function parameter: String email; getQuery(getSelect() + "where lower(o.email) = lower(:email)").setParameter("email", email); now, on getting result I got org.postgresql.util.PSQLException: ERROR: function lower(bytea) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. but if I call getQuery(getSelect() + "where lower(o.email) = lower('test')") or getQuery(getSelect() + "where lower(o.email) = lower(:email)").se

Join the discussion →

How to set up CodeIgniter site on localhost?

I'm new to CodeIgniter. I am trying to set up a CodeIgniter site on my local host. The site is working fine online. Here are the steps I have undertaken to migrate the site to my local host. edited the base_url in the application/config/congfig.php $config['base_url'] = "http://localhost/MyProjects/Project/reservation/"; changed the database connect settings in the application/config/database.php to connect to localhost database have set up the database The working site URL looks like this: www.example.com/reservation/index.php I have placed the site files in MyProjects/Project directory in lo

Join the discussion →

Populate HTML select tag options from query results in CodeIgniter [duplicate]

This is my simple php html code. <select id="district" name="district"> <option value="">Select district</option> <?php $sql = "SELECT * FROM district"; $result = mysqli_query($sql); while ($row = mysqli_fetch_array($result)) { $district_id = $row['district_id']; $district_name = $row['district_name']; ?> <option value="<?php echo $district_id; ?>"><?php echo $district_name; ?></option> <?php } ?> </select> It's not working. The database is autoloaded. What will be the problem?

Join the discussion →

select query in view file in codeigniter [duplicate]

This is my simple php html code. <select id="district" name="district"> <option value="">Select district</option> <?php $sql="SELECT * FROM district"; $result = mysqli_query($sql); while($row = mysqli_fetch_array($result)) { $district_id = $row['district_id'] ; $district_name = $row['district_name']; ?> <option value="<?php echo $district_id;?>"><?php echo $district_name;?></option> <?php } ?> </select> But it's not working. database is autoloaded.What will be the problem.

Join the discussion →

How to duplicate a sheet with protected ranges?

I have built a template sheet that I will duplicate every week. I noticed that when I go to duplicate it, none the protected ranges are copied along with it. Is it possible to use a Google Apps script to copy the exact same protected ranges into the duplicated sheet? It would save me lots of time every week.

Join the discussion →

Dial plan not working in asterisk server

I am writing asterisk dial plan for testing purpose. I write this in my extension.conf:- [demo] exten => s,1,Answer exten => s,n,Read(user_number) exten => s,n,SayDigits(${user_number}) exten => s,n,System(echo 'User entered ${user_number}' >> /tmp/key.txt) When i call on 8500, call successfully established, But when user press 1 or 2 or 3 key on sjphone then playback is not working. I can't hear any sound. Here is my complete extension.conf:- ; ; Static extension configuration file, used by ; the pbx_config module. This is where you configure all your ; inbound and outbound calls in Asterisk.

Join the discussion →

How to edit data in mysql through a modal

I've been having errors with this code. I'm new to bootstrap and using modals for things. I used to run off child forms for all my 'fancy' forms but now I'm doing a move towards modals. This is my code for grabbing the modals: <button class="btn btn-primary" data-toggle="modal" data-target="#newmemberModal">Add new Member</button> <br /> <br /> <?php $result = mysql_query("SELECT * FROM `players` ORDER BY `players`.`user` ASC") or die(mysql_error()); echo " <div class='table-responsive'><table class='table'>"; echo "<tr><th>Username</th> <th>Rank</th> <th>Position</th> <th>DoP</th> <th>Tag</th

Join the discussion →

Writing to a text file from SQL Server with out using Command shell

I am trying to write a log file when ever a script is run. the Log file is .txt file. I am using the following codeto do that - create PROCEDURE [dbo].[WriteToFile] @File VARCHAR(2000), @Text VARCHAR(2000) AS BEGIN DECLARE @OLE INT DECLARE @FileID INT EXECUTE sp_OACreate 'Scripting.FileSystemObject', @OLE OUT EXECUTE sp_OAMethod @OLE, 'OpenTextFile', @FileID OUT, @File, 8, 1 EXECUTE sp_OAMethod @FileID, 'WriteLine', Null, @Text EXECUTE sp_OADestroy @FileID EXECUTE sp_OADestroy @OLE END I have already activated the permissions for them to work but they are not working. Figured out that the " EX

Join the discussion →

scikit-learn: Finding the features that contribute to each KMeans cluster

Say you have 10 features you are using to create 3 clusters. Is there a way to see the level of contribution each of the features have for each of the clusters? What I want to be able to say is that for cluster k1, features 1,4,6 were the primary features where as cluster k2's primary features were 2,5,7. This is the basic setup of what I am using: k_means = KMeans(init='k-means++', n_clusters=3, n_init=10) k_means.fit(data_features) k_means_labels = k_means.labels_

Join the discussion →

Android SDK folder structure

Is there a reference like this (http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html) that explains the folders inside the main Android SDK folder? Based on the response I've got so far, I think I need to clarify further what I'm looking for. I wanted to know the basis for the SDK to be divided into these folders (screenshot below). For e.g. something similar to the following excerpt in the 'SDK Readme.txt' "Platform-tools contains build tools that are periodically updated to support new features in the Android platform (which is why they are separate from basic SDK tools), including adb,

Join the discussion →
Older stories