Search Results

Search found 22283 results on 892 pages for 'at least three characters'.

Page 17/892 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • How to handle key in PhP array if the key contains japanese characters [migrated]

    - by Jim Thio
    I have this array: [ID] => ????????-???????????__35.79_139.72 [Email] => [InBuildingAddress] => [Price] => [Street] => [Title] => ???????? ??????????? [Website] => [Zip] => [Rating Star] => 0 [Rating Weight] => 0 [Latitude] => 35.7865334803033 [Longitude] => 139.716800710514 [Building] => [City] => Unknown_Japan [OpeningHour] => [TimeStamp] => 0000-00-00 00:00:00 [CountViews] => 0 Then I do something like this: $output[$info['ID']]=$info; //mess up here $tes=$info['ID']['Title']; Well guess what it messes up. Basically even though the content of an array in PhP can be Japanese. Is this true? What's wrong. The error I got is: Debug Warning: /sdfdsfdf/api/test2.php line 36 - Cannot find element ????????-???????????__35.79_139.72 in variable Debug Warning: /sdfdsfdf/api/test2.php line 36 - main() [function.main]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead So many question mark Why is this happening. What's really going on inside PhP? Where can I learn more of such things. Most importantly, what would be the best way to handle this situation. Should I tell PhP to internally always use UTF-8? Does PhP array inherenty cannot use non ascii id?

    Read the article

  • URL hex characters in .htaccess

    - by Steve
    There is an old page with a space in the filename, and this is no longer found on the website. So I need to redirect this page to another page using a 301 redirect in .htaccess. If I place the filename directly into .htaccess (Bouquets%20%26%20Loose.html), the redirect does not work. If I escape the % sign like this (Bouquets\%20\%26\%20Loose.html), the redirect still does not work. How do I get this redirect to work in .htaccess? Thanks.

    Read the article

  • Accented characters representation in the URL

    - by Dan
    We have support for various languages in our website, including Spanish, French and Swedish. For now, the links in the site are NOT encoded before sent to the browser, sending the real accented chars (if such exists, i.e. href="www.(dot)example(dot)com/héllo.html") and not their HEX representation. This works & looks good on all browsers, including Chrome, FF and IE. However, we care great deal about SEO. We got this tip that encoding the links before sending them to the browser (so instead of linking to http://www.example.com/héllo, we will link to http://www.example.com/h%E9llo) will improve the way search engines will 'understand' the links and the keywords in the URL. This involves some work at our side, so we wanted to know if there's truth in that tip, but couldn't find anything addressing this issue.

    Read the article

  • Shakespeare and storing Unicode characters

    - by John Paul Cook
    This post is about the political issues involved with using multiple languages in a global organization and how to troubleshoot the technical details. The CHAR and VARCHAR data types are NOT suitable for global data. Some people still cling to CHAR and VARCHAR justifying their use by truthfully saying that they only take up half the space of NCHAR and NVARCHAR data types. But you’ll never be able to store Chinese, Korean, Greek, Japanese, Arabic, or many other languages unless you use NCHAR and NVARCHAR...(read more)

    Read the article

  • Breathing for game/movie characters

    - by dtldarek
    Breathing (the movement of chest and face features): I'd like to ask if it is hard to model and whether it is computationaly expensive. I recently noticed the great effect it has in Madagascar 3 movie, but (please, correct me if I am wrong) don't remember seeing it in any games (except maybe steam cloud in cold/winter setting) and very few animated movies does that to noticable degree (e.g. when it is necessary by the plot or situation). I'd greatly appreciate answers from both movie graphics and game graphics perspective.

    Read the article

  • Python Least-Squares Natural Splines

    - by Eldila
    I am trying to find a numerical package which will fit a natural which minimizes weighted least squares. There is a package in scipy which does what I want for unnatural splines. import numpy as np import matplotlib.pyplot as plt from scipy import interpolate import random x = np.arange(0,5,1.0/2) xs = np.arange(0,5,1.0/500) y = np.sin(x+1) for i in range(len(y)): y[i] += .2*random.random() - .1 knots = np.array([1,2,3,4]) tck = interpolate.splrep(x,y,s=1,k=3,t=knots,task=-1) ynew = interpolate.splev(xs,tck,der=0) plt.figure() plt.plot(xs,ynew,x,y,'x')

    Read the article

  • Position of least significant bit that is set

    - by peterchen
    I am looking for an efficient way to determine the position of the least significant bit that is set in an integer, e.g. for 0x0FF0 it would be 4. A trivial implementation is this: unsigned GetLowestBitPos(unsigned value) { assert(value != 0); // handled separately unsigned pos = 0; while (!(value & 1)) { value >>= 1; ++pos; } return pos; } Any ideas how to squeeze some cycles out of it? (Note: this question is for people that enjoy such things, not for people to tell me xyzoptimization is evil.) [edit] Thanks everyone for the ideas! I've learnt a few other things, too. Cool!

    Read the article

  • Targeting specific material by name in the imported model

    - by Aleksander Lenart
    I'm trying to select a particular material in the imported model (via Collada loader) in Three.js. I know this can be done with the getChildByName method but it just doesn't work for me. I couldn't find any working example with this method included, either. What am I doing wrong here? loader = new THREE.ColladaLoader(); loader.load('myModel.dae', function ( collada ) { model = collada.scene; var myMaterial = model.getChildByName( 'materialName', true ); myMaterial.material = new THREE.MeshBasicMaterial( { wireframe: true } ); });

    Read the article

  • jquery validate check at least one checkbox

    - by Omu
    I have something like this: <form> <input id='roles' name='roles' type='checkbox' value='1' /> <input id='roles' name='roles' type='checkbox' value='2' /> <input id='roles' name='roles' type='checkbox' value='3' /> <input id='roles' name='roles' type='checkbox' value='4' /> <input id='roles' name='roles' type='checkbox' value='5' /> <input type='submit' value='submit' /> <form> I would like to validate that at least one checkbox (roles) should be checked, is it possible with jquery.validate ?

    Read the article

  • Python: Elegant way to check if at least one regex in list matches a string

    - by houbysoft
    Hi. I have a list of regexes in python, and a string. Is there an elegant way to check if the at least one regex in the list matches the string? By elegant, I mean something better than simply looping through all of the regexes and checking them against the string and stopping if a match is found. Basically, I had this code: list = ['something','another','thing','hello'] string = 'hi' if string in list: pass # do something else: pass # do something else Now I would like to have some regular expressions in the list, rather than just strings, and I am wondering if there is an elegant solution to check for a match to replace if string in list:. Thanks in advance.

    Read the article

  • JQuery - is at least one checkbox checked

    - by Laramie
    I am in the process of learning JQuery thanks mostly to the positive reference here on Stack Overflow. I need a function that checks all the checkboxes in an element which have the same CSS class. It should returns true if at least one of them is checked. There are also other boxes in the element that are irrelevant to the check. The CSS class is unnecessary and only in place to create a way to identify the checkboxes in the group. It feels like bad practice, so any recommendations about other ways to identify them are welcome.

    Read the article

  • Certain Japanese characters aren't displayed properly

    - by Nisto
    On the following site: http://www.nciku.com/search/radical the first 2 characters on the second row of the "Step 2" table aren't displayed properly. All other characters look fine. I tried re-installing the Asian fonts via the checkboxes regarding Asian fonts in the "Regional and Language Options" control panel applet. I have tried removing every single Font from the Fonts folder (some were ofcourse not possible to remove), and re-installing them all again. I did this by... Running cmd Closing down the explorer process In cmd; using the command DEL /F /S /Q * in the Fonts folder Putting in my XP SP3 Retail disc In cmd; using expand -r *.tt_ in the I386 folder on the XP disc (and any other font file, in the I386\LANG folder) I also tried installing this pack from Microsoft, but this solved nothing either. I even tried running my browser (Firefox) through AppLocale. And changing character encoding -- again, does not help. I've also tried viewing the page in Internet Explorer. What could be wrong? I have checked my Fonts folder, to make sure that every single font available on the XP disc is available in WINDOWS\Fonts. What shows in the first square on the second row - I can't really tell what it's supposed to look like (but it's not the proper character)... but the second square shows a rectangular symbol containing HEX code. I've been in this situation before -- and it has been when I've been missing fonts. But how could I possibly be missing a necessary font? Shouldn't it be provided in the Asian "font packages"? I've talked to some other users that has viewed the page, and they had no problems displaying those characters on second row - even though they're only using the fonts provided on the Windows installation disc. Windows XP Professional Service Pack 3 (x86 - with latest updates) Firefox 3.6.15

    Read the article

  • Batch file to create many files with special characters

    - by MollyO
    Essential info: I have a file "DB_OUTPUT.TXT" with 304 lines that I need to turn into 304 files (one per line). Each line contains many special characters and may be up to tens of thousands of characters long. For these reasons, I'm having difficulty using a cmd.exe batch file (which limits the amount of input) and the echo command (which would try to execute each special character, short of me having to escape them all). I also have a file "DB_OUTPUT_FILENAMES.TXT" containing a distinct filename for each line-soon-to-be-file from "db_output.txt". So line 1 of DB_OUTPUT.TXT needs to be the body of a new file with a name equal to line 1 of DB_OUTPUT_FILENAMES.TXT. Extra info: As you may have guessed, DB_OUTPUT.TXT is output from a database; it contains 304 records with 6 or 7 columns at a fixed width with the last column being a SQL query. Each of these lines (db records) will be used as a script to create new database objects, which is why the special characters need to be preserved. Question: Is there a way to do this in a batch-like fashion? I'd be happy with either a Windows solution or a Linux one.

    Read the article

  • How to display escaped characters in tmux status bar

    - by walrus
    i am running tmux from a tty on an embedded linux device. (NOT a terminal emulator) because the screen is rather small, i want to add some "icons" to the tmux status bar. to achieve this, i have simply created a font with the appropriate glyphs for things like battery, or wifi. i can load the font, and display the characters with calls that use an escape to the line drawing characters like so: echo -e "\xe\234\xf" \xe escapes me into line drawing character mode, \234 is my created character, and \xf returns me to normal character mode so my terminal doesnt start getting goofy. this works perfectly if i enter the command at the terminal whether tmux is started or not. the issue arises if i then try to use it in my ~/.tmux.conf file for the status bar. i currently have a line like this: set -g status-right "#(echo -e "\xe\234\xf") #(/script/to/output/powerlevel) this simply outputs \xe\234\xf powerlevel this goes the same if i try printf over echo. this is the output i would expect to get on the terminal if i made the call without passing -e to echo, or without enclosing the statement with quotes. i then decided to wrap the calls to the echo or printf in a shell script. again, the script works when called from the terminal, but not in tmux's status bar. now i get the unprintable character "?" instead of my icon, like this: ? powerlevel this is what i would expect if i did not use the line drawing escapes previously mentioned above, or if i tried to copy and paste the character as text using tmux. in addition, the calling of these character scripts screws up the rest of my status-right, as the clock has about 6 digits for minutes when it is called (though it correctly only updates two of them). how can i make tmux respect the escape characters? any help or insight is greatly appreciated.

    Read the article

  • ftp.exe does not convert end of line characters while transferring to FreeBSD ftp server

    - by Jagger
    I am having problems transferring a text file from Windows 7 using ftp.exe to a FreeBSD server. After the file transfer the end-of-line characters are not changed from \r\n to \n, Instead they remain with the carriage return character which can be seen in for example mcedit as ^M. The file is transferred in ascii mode. Has anybody run into similar problems in the past? As far as I know using the ascii mode during FTP transfer should convert those characters automatically. Does it depend on the server configuration? EDIT: The file can be seen here. EDIT: I have also tried with ncftp.exe under Cygwin but the result is the same. The carriage return character has not been removed even if the transfer type was ASCII. EDIT: It does not work the other way round either. I created a text file in FreeBSD and then downloaded it is ASCII mode to my Windows machine. The end of line characters remained LF as they were in FreeBSD.

    Read the article

  • MVC3 custom validation attribute for an "at least one is required" situation

    - by Pricey
    Hi I have found this answer already: MVC3 Validation - Require One From Group Which is fairly specific to the checking of group names and uses reflection. My example is probably a bit simpler and I was just wondering if there was a simpler way to do it. I have the below: public class TimeInMinutesViewModel { private const short MINUTES_OR_SECONDS_MULTIPLIER = 60; //public string Label { get; set; } [Range(0,24, ErrorMessage = "Hours should be from 0 to 24")] public short Hours { get; set; } [Range(0,59, ErrorMessage = "Minutes should be from 0 to 59")] public short Minutes { get; set; } /// <summary> /// /// </summary> /// <returns></returns> public short TimeInMinutes() { // total minutes should not be negative if (Hours <= 0 && Minutes <= 0) { return 0; } // multiplier operater treats the right hand side as an int not a short int // so I am casting the result to a short even though both properties are already short int return (short)((Hours * MINUTES_OR_SECONDS_MULTIPLIER) + (Minutes * MINUTES_OR_SECONDS_MULTIPLIER)); } } I want to add a validation attribute either to the Hours & Minutes properties or the class itself.. and the idea is to just make sure at least 1 of these properties (Hours OR minutes) has a value, server and client side validation using a custom validation attribute. Does anyone have an example of this please? Thanks

    Read the article

  • Connect three computers (including one laptop) to one monitor

    - by Jesse Beder
    I have the following hardware: 2 Desktop PCs, running Windows XP and Ubuntu Macbook Pro a LCD monitor, a wired keyboard, and a wired mouse Currently, I'm using an oldish IOGear KVM switch to connect the two PCs to the input/output (and it works very well). I'd like a setup that includes the laptop as well, ideally maintaining as much portability as possible (meaning I'd like to be able to sit down, easily plug in my laptop, work on all computers, then easily pick up and leave with the laptop - is docking station the right word here?). What hardware do I need to do this?

    Read the article

  • Why do I have three My Documents folders?

    - by root45
    I'm trying to fix my profile on Windows 7. Currently %USERPROFILE% points to C:\Users\myUsername My Documents is also at C:\Users\myUsername \\profileServer\profiles$\myUsername has TWO "My Documents" folders Neither of these folders contain what's in C:\Users\myUsername\My Documents Navigating to %USERPROFILE% in Windows Explorer displays two copies of everything, one local and one copy from the server. Programs use sort of a toss up between C:\Users\myUsername\My Documents or one of the two My Documents on profileServer. According to our sysadmins, My Documents is supposed to point to the profile server, but other folders should be local. How can I fix this so I have ONE copy of everything, with My Documents pointing to \\profileServer\profiles$\myUsername\Documents and everything else local? To be honest, I don't understand why this is so difficult and confusing. For example, why does Windows allow displaying two folders with the same name in the same directory? And why does inputting C:\Users\myUsername and %USERPROFILE% into Windows Explorer produce two different results? They should be identical. Some screenshots My directory on the profileServer My local user directory, C:\Users\myUsername Navigating to %USERPROFILE% in Windows Explorer Showing that %USERPROFILE% is set to a local directory

    Read the article

  • having trouble setting up ganglia on three machines

    - by Pieter Breed
    I am running ubuntu 11.10 I have one machine with gmetad, gmond and ganglia-webinterface. When I browse the web interface this machine picks up the local gmond output. I then added another machine, running only gmond. I didn't really change anything in the config, only the name of the cluster. This machine's output showed up in the web view. The I tried to add a third machine, similarly to the second, but it's not showing up in the web view. I tried looking at syslog and running as a daemon, but I'm not seeing anything suspicious there. Any tips for trouble shooting this?

    Read the article

  • Windows 7: from Geforce 8800 to three monitors?

    - by lance
    I've got a GeForce 8800 that I've quite happy with. It drives my two 23" widescreen displays well. Now I've got a 19" standard display that I want to stick between the two widescreens. My second PCIe 16x slot is unused (as is the PCI slot below that), and I want to add a card to my Win7 x64 system. This 19" display won't be used for gaming, so I don't need anything fancy. Here are two cards I was considering, but I'm wondering if they're bad choices for some reason? If they're both fine choices, which is better and why? Again, I'm needing to power only the 19" standard display with this card, and it won't play games. I just need 1280x1024 in Win7 x64. NVidia: Galaxy 95TFE8HUFEXX GeForce 9500 GT Video Card - 512MB DDR2, PCI Express 2.0 ATI: ASUS EAH4350 SILENT/DI/51 Radeon HD 4350 Video Card - 512MB DDR2, PCI Express 2.0

    Read the article

  • Amazon EC2 Instance - m1.medium Ubuntu 12.04 - Started to crash three days ago

    - by Joy
    The environment: Amazon EC2 Instance - m1.medium Ubuntu 12.04 Apache 2.2.22 - Running a Drupal Site Using MySQL DB Server RAM info: ~$ free -gt total used free shared buffers cached Mem: 3 1 2 0 0 0 -/+ buffers/cache: 0 2 Swap: 0 0 0 Total: 3 1 2 Hard drive info: Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 4.7G 2.9G 62% / udev 1.9G 8.0K 1.9G 1% /dev tmpfs 751M 180K 750M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 0 1.9G 0% /run/shm /dev/xvdb 394G 199M 374G 1% /mnt The problem About two days ago the site started failing becaue the MySQL server was shut down by Apache with the following message: kernel: [2963685.664359] [31716] 106 31716 226946 22748 0 0 0 mysqld kernel: [2963685.664730] Out of memory: Kill process 31716 (mysqld) score 23 or sacrifice child kernel: [2963685.664764] Killed process 31716 (mysqld) total-vm:907784kB, anon-rss:90992kB, file-rss:0kB kernel: [2963686.153608] init: mysql main process (31716) killed by KILL signal kernel: [2963686.169294] init: mysql main process ended, respawning That states that the VM was occupying 0.9GB, but my Ram has 2GB free, so 1GB was still left free. I understand that in Linux applications can allocate more memory than physically available. I don't know if this is the problme, it's the first time that it has started to happen. Obviously, the MySQL server tries to restart, but there's no memory for it apparently and it won't restart. Here is its error log: Plugin 'FEDERATED' is disabled. The InnoDB memory heap is disabled Mutexes and rw_locks use GCC atomic builtins Compressed tables use zlib 1.2.3.4 Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 Completed initialization of buffer pool Fatal error: cannot allocate memory for the buffer pool Plugin 'InnoDB' init function returned error. Plugin 'InnoDB' registration as a STORAGE ENGINE failed. Unknown/unsupported storage engine: InnoDB [ERROR] Aborting [Note] /usr/sbin/mysqld: Shutdown complete I simply restarted the Mysql service. About two hours later it happened again. I restarted it. Then it happened again 9 hours later. So then I thought of the MaxClients parameter of apache.conf, so I went to check it out. It was set at 150. I decided to drop it down to 60. As so: <IfModule mpm_prefork_module> ... MaxClients 60 </IfModule> <IfModule mpm_worker_module> ... MaxClients 60 </IfModule> <IfModule mpm_event_module> ... MaxClients 60 </IfModule> Once I did that, I had the apache2 service restart and it all went smoothly for 3/4 of a day. Since at night the MySQL service shut down once again, but this time it wasn't killed by the Apache2 service. Instead it called the OOM-Killer with the following message: kernel: [3104680.005312] mysqld invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0 kernel: [3104680.005351] [<ffffffff81119795>] oom_kill_process+0x85/0xb0 kernel: [3104680.548860] init: mysql main process (30821) killed by KILL signal Now I'm out of ideas. Some articles state that the ideal thing to do is change the kernel behaviour with the following (include it to the file /etc/sysctl.conf ) vm.overcommit_memory = 2 vm.overcommit_ratio = 80 So no overcommits will take place. I'm wondering if this is the way to go? Keep in mind I'm no server administrator, I have basic knowldege. Thanks a bunch in advance.

    Read the article

  • three monitors with radeon 5870 on 1920x 1080

    - by antoniocs
    Hey! I have 3 monitors, 2 24 inch and one 22 inch. The max resolution of the 24 inch monitors is 1920 x 1080 and the 22 is a bit less (can't remember right now). I read Jeff's post about the display port adapters and I was wondering if passive adapter would do the trick since neither of the monitors have big resolutions. Thanks

    Read the article

  • Mixing both local and nonlocal addresses on three switches

    - by klew
    I have four computers that have nonlocal addresses like 150.X.X.X. Now I also get another few computers that should be only accessible through a gateway (it will be computing cluster) and they addresses are 10.0.0.X. I also wanted to include those four older computers to this new cluster, but I want them to be accessible from internet on nonlocal addresses (so I would like to set up them on both 150.X.X.X and 10.0.0.X addresses - I've set up it as interface eth0:0 since I have only one NIC). Those new computers have their switch and old computers also have their own switch. Both of them are connected to another (third) switch. The problem is that those old computers see each other (I can ping them), and also new computers see each other, but I can't ping old computer from new computer and vice versa. However pinging on nonlocal adresses works as expected. I looked into switch configuration and didn't find anything useful. I have no idea what I missed here. Can somebody help? All computers have Ubuntu Server 10.04

    Read the article

  • How to make one CPU to be used simulataneously be three different users

    - by beginning_steps
    As a bootstrapping start-up we are thinking of saving on the IT hardware cost by making more use of the hardware that we have. As a solopreneur I have a laptop config : intel core2duo processor, 3Gb RAM and 250 GB RAM. Now we are planning to increase our team to 3 members. Will like your suggestions on the nest cost-effective step that I can take so that I can use the computing power of the existing laptop to act as a kind of server and then buy to more monitors where the new recruits can do the daily work on and they need to have different login id and access and they dont need access to all the files/applications as are available in my laptop. We use internet intensively to do our day to day activity. Please share you experience, whether you think this is a good ploy or there is any other more effective way of achieving the same result.

    Read the article

  • Using RegEx to replace invalid characters

    - by yeahumok
    Hello I have a directory with lots of folders, subfolder and all with files in them. The idea of my project is to recurse through the entire directory, gather up all the names of the files and replace invalid characters (invalid for a SharePoint migration). However, i'm completely unfamiliar with Regular Expressions. The characters i need to get rid in filenames are: ~, #, %, &, *, { } , \, /, :, <, ?, -, | and "" I want to replace these characters with a blank space. I was hoping to use a string.replace() method to look through all these file names and do the replacement. So far, the only code i've gotten to is the recursion. I was thinking of the recursion scanning the drive, fetching the names of these files and putting them in a List. Can anybody help me with how to find/replace invalid chars with RegEx with those specific characters?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >