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.
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
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
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?
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
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
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
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
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
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?
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.
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.
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
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
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_
What is the final version of the ADT Bundle that was released by Google? Since "Android Studio" was announced as official IDE for the development of Android apps, the ADT Bundle (Eclipse with ADT Plugin & Android SDK) cannot be downloaded from developer.android.com any longer. I also could not find a version history for the ADT Bundle. I need the final version number in the form "YYYYMMDD", so I can determine the URL for downloading according to the following pattern (see also this answer): http://dl.google.com/android/adt/adt-bundle-windows-x86_64-<YYYYMMDD>.zip For example, the following dow
We're using hibernate 3 and c3p0-0.9.1. We have a Hibernate criteria based query to check the keyed in username and password from database tables as well as other queries. During execution of first query i.e the login page, we're facing the connecion reset issue with SQLState as null. If we provide the details again in the page, everything is working fine for some time. If we try after some time, again the same problem from the first time happens and when we re-enter the user name and password, it is working fine for some time. Please find the below error messages for reference. 00:12:42 WARN
I'm running a script on my ubuntu on openstack (env bash) which is trying to install the latest stable chrome browser: sudo apt-get update sudo apt-get -y install openjdk-7-jre google-chrome-stable But I'm getting --> Unable to locate package google-chrome-stable ubuntu I tried the following additions but they didn't help: # trying universe repo sudo apt-get -y install libgconf2-4 libnss3-1d libxss1 sudo apt-get update # trying something for openstack sudo apt-get install ubuntu-cloud-keyring sudo apt-get update Will be happy to hear more suggestions.
What are good ways to detect whether a style sheet has loaded using vanilla JavaScript? I understand they do not have the same load event that images and scripts fire. Loading as packed into a .js file (like with WebPack 'loaders') is not an option. 2022 update: All major browsers have now supported onload= on <link rel=stylesheet> tags for years, so that would be the obvious way to detect when CSS has loaded. Note also that external stylesheets in the head are blocking during page load, but can be added later with JS to make them asynchronous. It’s that scenario in which my question is releva
I have set up my spring server to respond to a POST request containing a Message object as: @RequestMapping(value = "/signup", method = RequestMethod.POST, consumes = "application/json") public @ResponseBody Message signUp(@RequestBody Message message) { logger.info("Accessing protected resource"); return new Message(100, "Congratulations!", "You have signed up. msg:"+message.toString()); } The Android client is set up to send the request as: @Override protected Message doInBackground(Void... params) { // TODO Auto-generated method stub final String url = "http://10.0.2.2:8080/signup"; HttpHea
I started using Hibernate today and tested a simple example but I'm getting the error: hibernate.cfg.xml not found. I putted the hibernate.cfg.xml file in the src folder and here is its content: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" > <hibernate-configuration> <session-factory> <!-- Database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://loca
I'm writing a program in OpenGL to load a mesh and draw an oriented bounding box around said mesh. The mesh loads correctly, but when I draw the bounding box the box is the wrong shape and far too small. The process I used to calculate this box was to use principal component analysis to find a covariance matrix. I then got the eigenvectors of that matrix and used those as a local coordinate system to find the eight vertices of the cube. Then I calculated a transformation to move the cube from the local coordinate system to the global coordinate system. The code for calculating the covariance i
I started getting back to python coding and realized I couldn't quite figure this out. I'm trying to code a prime number function. Could someone help with this? Here is my code: def is_prime(x): a = True for n in range(2, x-1): while n < x: n+=1 if x % n == 0: a = False elif n < 2: a = False else: a = True break break return a If anyone has an idea on what I'm doing wrong, please let me know. A month ago I tried this and couldn't get the logic down. I think I was stumped and didn't ever ask for help... Also, how long do you think I should try to do this for before I ask for help on average?
I am trying to POST content to URL using CURL. My code snippet is as follows curl_easy_setopt(curl_handle, CURLOPT_PROXY, "proxy.xyz.com:8080"); curl_easy_setopt(curl_handle, CURLOPT_PROXYUSERPWD, "uname:password"); curl_easy_setopt(curl_handle,CURLOPT_POSTFIELDS, jsonResult.c_str()); curl_easy_setopt(curl_handle, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl_handle, CURLOPT_URL, "url"); curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L); /* provide a buffer to store errors in */ curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, error); res = curl_easy_perform(curl_handle); if(res !=
I will be traveling to Patagonia in January with few friends and wanted to know if I could drive to Torres del Paine. Specifically, we were thinking of: Renting a car in El Calafate Driving to Torres del Paine Parking in Torres del Paine while we hike the 'W' trail Driving back to El Calafate. Any advice would be appreciated. Though I guess, I am most concerned about whether it is possible (or safe) to park somewhere in Torres del Paine, and whether we will run into trouble crossing the Argentina-Chile border.
If I get a JWT and I can decode the payload, how is that secure? Couldn't I just grab the token out of the header, decode and change the user information in the payload, and send it back with the same correct encoded secret? I know they must be secure, but I just would really like to understand the technologies. What am I missing?
I am novice here in MATLAB. My task is to write code for a multimodal biometric system using discrete wavelet transform and PCA (principal component analysis) for 100 people database containing 9 faces, 2 ears and 2 thumbprint images. For the same, I wrote the following code for each sample E11 = imread('E1(1).JPG'); E11 = imresize(E11, [100 100]); E11 = rgb2gray(E11); %colormap(pink) [a, b, c, d] = dwt2(E11, 'haar'); X = a; E11 = X(:); E11 = im2double(E11); for reading all those images After that, i applied PCA on all these images, and after it i used the minimum distance classifier mindist =
So I know that the smallest positive integer not representable by a single precision floating point is 223+1 + 1 = 16,777,217. How did we figure out that we use 223+1 + 1. I understand that there is an implied 1, along with 23 being the number of bits represented in the mantissa but why does this work?