Mysql special characters
I need to store on my Mysql database values like: Badaẖšan.
On this particular case the DB is saving Badah?šan.
I'm using Charset: UTF8 and Collation: utf8_unicode_ci.
What Charset/Collation should I use to store the correct value?
Tuesday, 10 September 2013
Dynamically Size Div
Dynamically Size Div
I'm doing some HTML and am running into an issue with my left and right
column divs not scaling based on the content inside them as well as in
proportion to the rest of the page.
Here's my example: http://i.imgur.com/9vi2EK9.png
And my CSS for each of the divs:
#wrapper{
background:white;
width:1280px;
position:relative;
border: 1px solid black; /* black border */
margin:auto; /* centre this div */
}
#header{
height:90px;
text-align:center;
padding: .5em;
background-color: grey;
border-bottom: 2px solid black;
}
#leftmenu{
width:100px;
float:left;
font-size: 75%;
padding:.5em;
border-right:2px solid black;
border-left:2px solid black,
}
#rightmenu{
width:180px;
float:right;
font-size: 75%;
padding:.5em;
border-left:2px solid black;
border-right:1px solid black;
}
#content{
background-color:white;
margin-left:120px;
font-size: 80%;
}
#footer{
clear:both; /* push footer under other divs */
height: 70px;
background-color:white;
border-top:1px solid black;
border: 1px solid black;
padding-top:40px;
text-align:center;
font-size: 70%;
}
How can I ensure that my divs resize based on the content in my other divs?
Thanks!
I'm doing some HTML and am running into an issue with my left and right
column divs not scaling based on the content inside them as well as in
proportion to the rest of the page.
Here's my example: http://i.imgur.com/9vi2EK9.png
And my CSS for each of the divs:
#wrapper{
background:white;
width:1280px;
position:relative;
border: 1px solid black; /* black border */
margin:auto; /* centre this div */
}
#header{
height:90px;
text-align:center;
padding: .5em;
background-color: grey;
border-bottom: 2px solid black;
}
#leftmenu{
width:100px;
float:left;
font-size: 75%;
padding:.5em;
border-right:2px solid black;
border-left:2px solid black,
}
#rightmenu{
width:180px;
float:right;
font-size: 75%;
padding:.5em;
border-left:2px solid black;
border-right:1px solid black;
}
#content{
background-color:white;
margin-left:120px;
font-size: 80%;
}
#footer{
clear:both; /* push footer under other divs */
height: 70px;
background-color:white;
border-top:1px solid black;
border: 1px solid black;
padding-top:40px;
text-align:center;
font-size: 70%;
}
How can I ensure that my divs resize based on the content in my other divs?
Thanks!
arithmetic error: Floating illegal operand [IDL]
arithmetic error: Floating illegal operand [IDL]
I have this code:
close, 1 & openr,1,filename,error=err
if (err ne 0) then begin
close, 1
n=0
return
endif
line=fltarr(41)
while(not(eof(1))) do begin
readf,1,line
endwhile
And on the line readf,1,line I get the following error:
READF: End of file encountered. Unit: 1, File: results
Program caused arithmetic error: Floating illegal operand
I see what the cause is and I read the docs about it, but I still don't
understand what arithmetic error has to do with EOF (why EOF? I checked if
not(eof(1))) and what to do to get rid of this error. Do you have any
ideas?
I have this code:
close, 1 & openr,1,filename,error=err
if (err ne 0) then begin
close, 1
n=0
return
endif
line=fltarr(41)
while(not(eof(1))) do begin
readf,1,line
endwhile
And on the line readf,1,line I get the following error:
READF: End of file encountered. Unit: 1, File: results
Program caused arithmetic error: Floating illegal operand
I see what the cause is and I read the docs about it, but I still don't
understand what arithmetic error has to do with EOF (why EOF? I checked if
not(eof(1))) and what to do to get rid of this error. Do you have any
ideas?
Build error while runing
Build error while runing
I am trying to run a code snippet multiple numbers of times in C#.Project
name is test.Initial number of times it's running properly but after that
i am getting the following build error."Error 1 Unable to copy file
"obj\x86\Debug\test.exe" to "bin\Debug\test.exe". The process cannot
access the file 'bin\Debug\test.exe' because it is being used by another
process.test". How can I get rid of this error.
I am trying to run a code snippet multiple numbers of times in C#.Project
name is test.Initial number of times it's running properly but after that
i am getting the following build error."Error 1 Unable to copy file
"obj\x86\Debug\test.exe" to "bin\Debug\test.exe". The process cannot
access the file 'bin\Debug\test.exe' because it is being used by another
process.test". How can I get rid of this error.
Monday, 9 September 2013
Too many views in storyboard - Xcode running Slow
Too many views in storyboard - Xcode running Slow
pI'm helping someone out with an xcode project but it's almost impossible.
They have around 100 View controllers on their storyboard and it's just
running really slow. I've followed all of the guides on making Xcode
faster but they just don't help for this situation. Outside of that
storyboard, when we're working in the .h and .m files it runs perfectly
fine, it's just inside the storyboard that it runs slow. Has anyone had
any experience with a project like this? What did you do? Or what can I do
to make it possible to work in the storyboard? Thanks/p
pI'm helping someone out with an xcode project but it's almost impossible.
They have around 100 View controllers on their storyboard and it's just
running really slow. I've followed all of the guides on making Xcode
faster but they just don't help for this situation. Outside of that
storyboard, when we're working in the .h and .m files it runs perfectly
fine, it's just inside the storyboard that it runs slow. Has anyone had
any experience with a project like this? What did you do? Or what can I do
to make it possible to work in the storyboard? Thanks/p
Parse out a object attribute inside of an array
Parse out a object attribute inside of an array
I'm trying to parse out the value from iso_code, here is what I have so far.
JSON.stringify(location.subdivisions, undefined, 4)
I can get the whole subdivisions array, but I'm not sure how to get the
iso_code.
"subdivisions": [
{
"iso_code": "FL",
"names": {
"en": "Florida",
"zh-CN": "·ðÂÞÀï´ïÖÝ",
"fr": "Floride",
"pt-BR": "Fl¨®rida",
"ja": "¥Õ¥í¥ê¥ÀÖÝ",
"es": "Florida",
"ru": "§¶§Ý§à§â§Ú§Õ§Ñ"
},
"geoname_id": 4155751
}
]
I'm trying to parse out the value from iso_code, here is what I have so far.
JSON.stringify(location.subdivisions, undefined, 4)
I can get the whole subdivisions array, but I'm not sure how to get the
iso_code.
"subdivisions": [
{
"iso_code": "FL",
"names": {
"en": "Florida",
"zh-CN": "·ðÂÞÀï´ïÖÝ",
"fr": "Floride",
"pt-BR": "Fl¨®rida",
"ja": "¥Õ¥í¥ê¥ÀÖÝ",
"es": "Florida",
"ru": "§¶§Ý§à§â§Ú§Õ§Ñ"
},
"geoname_id": 4155751
}
]
Using php array_chunk with mysqli_fetch_array
Using php array_chunk with mysqli_fetch_array
I need to break up an array into chunks, but it's the result of a mysql
query that contains multiple values. It looks like this:
$minQuery = "SELECT typeName, typeID FROM invTypes WHERE groupID = '18'";
$con = mysqli_connect('127.0.0.1', $username, $password, 'sdeodyssey107');
$result = mysqli_query($con,$minQuery);
What I need to do is to be able to break this result up into rows of 3 at
a time. I can't seem to find a way to get array_chunk to work with the
multiple values, and everything I have tried with while loops ends up with
me repeating the same value multiple times per row.
Anyone know a good way to handle this? The line that will be printed looks
like this:
echo '<td align="right">' . $typeName . ': <input type="text" size="25"
name="' . $typeName . '|' . $itemID .
'"';if(isset($_GET["$cleanTypeName|$itemID"])) echo
'value="'.$_GET["$cleanTypeName|$itemID"].'"';echo '></td>';
...so I need to have both values available each time I call the function
that prints those lines....
I need to break up an array into chunks, but it's the result of a mysql
query that contains multiple values. It looks like this:
$minQuery = "SELECT typeName, typeID FROM invTypes WHERE groupID = '18'";
$con = mysqli_connect('127.0.0.1', $username, $password, 'sdeodyssey107');
$result = mysqli_query($con,$minQuery);
What I need to do is to be able to break this result up into rows of 3 at
a time. I can't seem to find a way to get array_chunk to work with the
multiple values, and everything I have tried with while loops ends up with
me repeating the same value multiple times per row.
Anyone know a good way to handle this? The line that will be printed looks
like this:
echo '<td align="right">' . $typeName . ': <input type="text" size="25"
name="' . $typeName . '|' . $itemID .
'"';if(isset($_GET["$cleanTypeName|$itemID"])) echo
'value="'.$_GET["$cleanTypeName|$itemID"].'"';echo '></td>';
...so I need to have both values available each time I call the function
that prints those lines....
Subscribe to:
Posts (Atom)