« first day (964 days earlier)      last day (4210 days later) » 

00:00
when you will have you image created i suggest you have a look at this tool: forensicswiki.org/wiki/Foremost
nope, just did the update from Synaptic it was regarding some files with the 'ext' prefix so whatever they were they did something to the ext partitions I assume.
Then suddenly everything went to hell =o(
do you remember the name of the package?
@Happyninja no it was a bunch of files with the 'ext' prefix
let me search the repos
@crypticツ is the partition containing your packaging log intact?
yeah
I don't know if I keep logs for packages though, might..
I do
00:04
are you on the system right now or still from the live cd?
weird, it shows the history logs from yesterday only
live CD, but mounted the Linux partition since it's separate from my data
also on beginning of drive, rest of data is at end of drive
are those logs in /var/log/syslog?
@Happyninja /media/xubuntu/f5181887-495a-4b03-b869-ad24c1cb69f2/var/log/apt/
The last entry is End-Date: 2013-06-05 17:47:33
none from today
@crypticツ what is the filename?
@Happyninja history.log
00:09
do you see one named dpkg.log?
@Happyninja check that file too it's also only showing last log entry being yesterday
dafuk is going on. I think @DaveRandom might be right this looks like malware at work. This is my sources file (not tampered with) pastebin.com/QAjYw6cw should I contact the repos and tell them something might have been put there?
Srsly, as soon as more than one partition gets nuked, you're either looking at a f*cked HDD or malware. And usually if it's a f*cked HDD all your partitions are dead
@crypticツ maybe those packages you updated aren't part of the principal rep and that's why it wasn't reported by the log
One the bright side, chances are they're all just unlinked and therefore easily recoverable
i've seen some malware and they pretty commonly unlink stuff, or even just change permission so you can't see it cause you don't have the "right"
00:16
I mean if it was rm -fr /* it would have deleted root as well. I have /_foldername folders in my / which point to the other partitions, those folders are still there, you don't even need root to delete them as they are owned by my normal account
a bad person could override permission with a deny all over a grant all
was there web file (server partition) on that partition?
@Happyninja one of them was for my server files, but I don't run servers on my comp, firewall defaults to deny all as well.
is your firewall config file still the same?
me being paranoid: does your /etc/network/interfaces config contain different dns ?
@Happyninja yes
@Happyninja same Google DNS
00:24
I just updated my source.list file on live-cd to the one from system to check for updates. Hopefully those packages will be listed
made me think of a nasty way to tell a cc server if an host is still alive; change dns resolution for rep and bounce the traffic to the server to update the malware instead..
but wouldn't works for people not doing update :/
@Happyninja even if my DNS was redirected, the packages were signed and were validated.
@crypticツ at least it would be possible to tell the host is alive and trying to probably get the security fix by where the malware get in in the first place
@crypticツ i really hope you will get a solution and retrieve back your stuff
i know how freaking-out it can be
/_www /_encrypted /_virtual /_shared /home are all the drives showing up empty. I just want to recover the italicized ones =o( I'm going to head out and buy a new drive, will post back if I get any promising results
01:08
Any encryption experts here? stackoverflow.com/questions/16952025/…
@JoelMurphy There is but I think he's traveling atm
And he may or may not be available right now
@cspray Ah okay. Thanks dude :)
@JoelMurphy No problem. With your tags though I'm pretty confident he'll come across it
01:36
<?php

	$mode = "+";
	$processNumbers = create_function('$a, $b', "return \$a $mode \$b;");
	echo $processNumbers(2,3);

 ?>
Why there is need to escape $a and $b ??
@Cody Because they are using double quotes and not single
So that the strings '$a' and '$b' aren't parsed as variables
Although one could ask why they're implementing an add() function in that way to begin with
01:58
@Bracketworks The shortened ternary syntax is useful for all sorts of things:
function(callable $f = NULL) {
    $f = $f ?: 'default_function';
    // . . .
}
You can't default to the string 'default_function' in the typehint. If you try you get:
> Fatal error: Default value for parameters with callable type hint can only be NULL
02:18
@LeviMorrison Oh absolutely, and I use it; however, in this context it's not quite a "ternary" operator ;) I'd file it near (but not alongside) a coalesce operator.
I'm fairly sure Fuel PHP was pretty much JUST an HTTP client at one point. Am I crazy or did they just do a really bad job marketing it back then?
Also, chaining it appears to maintain the correct associativity
$v = $a ?: $b ?: $c ?: $d;
Pretty much reads $v equals $a (if it's not falsey, but if it is then $b (if it's not falsey but...))
@Bracketworks I'm surprised though doubtful. You are sure you tested it properly?
stackoverflow.com/questions/16952726/… "Oh maybe I'll give him a NOOOPE"
@LeviMorrison ...no ;)
Also, a default default default seems like awful structuring :]
02:24
Sure, but it dawned on me just now (having worked with C# so much recently) that it's quite coalescey
Which permits chaining.
I don't think it would read as default default default, but instead "One of these is something, and this is the order I want to find one in"
Even then I'm not sure I'd write it like that.
@LeviMorrison No, I'm not sure I would either, but knowing it's an option for brevity when it's comprehensible is always nice.
Well, my computer is taking an enormous shit, so alas, I must restart.
 
2 hours later…
04:12
Meow Meow
@YogeshSuthar meow :D
@NullPoiиteя Meow too :)
@NullPoiиteя What is the best way to read HTML table ? Suppose a huge table with <tr> <td>
human eyes do a pretty good job at reading tables.
05:35
@Yogus sorry i never used html table ... :( always using div
Hello all
@NullPoiиteя Never? Really?
want to use skype API to capture the chat in the sugarcrm
can anybody tell how to use skype API
@Jack yupp really :P
@NullPoiиteя I don't believe :)
05:37
@Jack Nice huh
so i dnt have experience in using API's and all
@NullPoiиteя Come on I know you can suggest me
@RavinChopra That's not a real question; it's too vague.
@Jack yupp ... when i start leaning ... html i found table boring and div was quite fun .. so i started working with div only and never feel any need of table
05:41
hello
i have a doubt
can any one help me
@NullPoiиteя See ... otherwise, quite honestly, you can't call yourself a "real" developer ;-)
Actually, tables solve a few interesting issues.
One of which is vertical centering.
jack can u help me out
@shashank help you out of what?
@Jack well i am not a developer ... i just love those thing and do for hobby :P however i have done graduation in Computer application ...
@jack i have a doubt in php
05:43
@shashank You're not the only one who has doubts about php :)
@shashank Your doubt please :D
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("test",$con);
$a=$_POST['name'];
$b=$_POST['xyz'];
if($_POST['submit'])
{
$sqlstmt="select * from java where option='".$b."'";
$row=mysql_query($sqlstmt);
//$row1=mysql_num_rows($row);
if($row!=0)
{
echo"hello";
$abc="update java set id=id+1 where option='".$b."'";
mysql_query($abc);
echo"hello";

}
else
{
$sqlsmt="insert into java values ('$a','$b','')";
mysql_query($sqlsmt);
}
}
?>
php itself a doubt
i have a table with name , option and id
@shashank Stop right there ... learn about preventing sql injection.
05:45
@shashank please dont use mysql_* stackoverflow.com/questions/12859942/…
ok but kindly suggest me an idea
please
1525
Q: How to prevent SQL injection in PHP?

Andrew G. JohnsonIf user input is inserted into an SQL query directly, the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO table (column) VALUES ('" . $unsafe_variable . "')"); That's because the user can input s...

^^ Read through that. @shashank
okay jack but can u suggest me an idea il ask you a question
@shashank i love sqli injection vulnerability on other website .. :P i mean your query is vulnerable to sql injection
@shashank No. Read, rewrite, then ask again.
05:46
okay jack :(
@shashank what is question ?
hm my table consists of three columns
name option and id
where option is of primary key
and it is a radio button
when the user clicks an option it checks whether the record exists
if yes it updates the id by 1
else it inserts the data
i am unable to update it
it is entering into else block but not if block
kindly suggest me an idea @null
pointer
If your table has three columns, your insert statement is wrong because it only uses two values.
please don't enter every time ... use ... instead
okay jack i have given three values
05:51
Put otherwise, Enter shouldn't be used as punctuation.
@shashank Also, use pastebin instead of pasting code inside here.
@shashank Use this code $row=mysql_query($sqlstmt);
$row1=mysql_num_rows($row);
if($row1 > 0)
@shashank Oh right, there are three values ... but you should specify the columns in the insert statement too ... trust me, it's better that way.
@yogesh it is showing error
i already
tried that method
which error @shashank
it is saying expects parameter 1 tobe resource
05:54
it means your query is failing @shashank put mysql_error()
yea but where should i keep yogesh
inside if
block or else after $row1
please approve flag 10k+
@shashank Use this $row=mysql_query($sqlstmt) or die(mysql_error());
@ThiefMaster ping
@yogesh : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option='a'' at line 1
06:00
option is a reserved word in MySQL queries.
no jack i gave option in my table
it is a coloumn
@shashank Option is reserved word in mysql use ` around it dev.mysql.com/doc/refman/5.5/en/reserved-words.html
okay yogesh i will change the option name
i mean coloumn name and i will try
use as ` option ` in query
no need to change the name of column
yea but it is now showing any columns
yogesh
06:05
means
now it is not showing error but it is not entering into if block
@Shashank I think this is your error is in where option='".$b."'"; .Use backticks for option like option
have you used the code which i gave you previously @shashank
yes yogesh but
not entering to if block
06:09
You used this? $row=mysql_query($sqlstmt);
$row1=mysql_num_rows($row);
if($row1 > 0)
yes not entering to if block
see the value of $row1
> Irony : please don't use mysql_* function those are deprecated :P:P:P
into @yogesh
into what ? See what $row1 gives you as output.
06:13
i used var_dump to print the value of $row 1 and it is giving as int 0
Morning Folks!
$shortCircuit = function ($r) use ($event) {
    if ($r instanceof ResponseInterface) {
        return true;
    }
    if ($event->getError()) {
        return true;
    }
    return false;
Can anyone explain the above code?
we don't have time :D
i am looking such a function construct for the first time
this is anonymous function
alrite, watz $r here?
06:14
@udaysagar rtfm: look at Closures
yogesh pls help me
@shashank Can you please send me detail error
they restricted e
help elp lp p - good morning!
06:15
@bwoebi Do you mean readthefuckingmanual.com ?
@hakre pls help me :)
@shashank Your query gives you 0 result. Check the query and run it in phpmyadmin and see whether it gives any rows or not.
yogus can u gime me mail id so that can mail u
@udaysagar yeah.
all post question
06:16
@Wes so contractor would be from italy (europe) and just support in english? Probably strato is able to. I can ask them in german if you like to :)
hi
personal mail :D
@shashank Why dot you post your question on SO . You will get replies in minutes
anyone know replace a php variable of php using javascript
no yogus
they restricted me to ask question
06:18
is there any function like sprintf() in javascript?
@shin nope.
Yes if you use this js phpjs.org/functions
but in console ,They are undefined
@shin JavaScript does not offer an native support of the sprintf() function
@NullPoiиteя @Jack I confess I always avoid arrays . I hate them sometimes they make me confuse . I have array phobia :(
@Jack Nope I am able to open
@Yogus array are quite awesome .. and fun .... try work on them and you will love them
@NullPoiиteя I tried and many times I tried so hard to overcome my phobia .. Still same. Actually I have this phobia from very first year of my college
I loves array. :D
06:32
@Yogus,I try url you given
that s working
thanks to all
@YogeshSuthar Any Kinder garten tutorial to overcome arrayphobia
o_0"
@Yogus I don't have kinder garden tutorial for this, but you can play with JSON, by encoding the array to json and decoding the json to array.
How about you tell us in which cases you would avoid arrays and we'll give a counter example using arrays :) @Yogus
@Yogus I have good exposure to that .. but I am just having phobia .. I know arrays but want to get rid of phobia.
06:38
Good morning everyone, have a great Dev day! :-)
@Jack I have to think on that ..Do you have any in which same can be achieved by array as well as without it
This is not about me, it's about you :)
Thanks . I would be grateful if you help me to remove arrayphobia :(
Ohk Then I will think
@Yogus If you want to get rid of phobia, just do practice with array.
@YogeshSuthar Yeah I think same
06:41
Random : github.com/stephenhay/rdw-code-examples just nice to share i thought
Hey @Jack tell me one think why I can see a pencil kind of Icon infront of your chat . Does that means edited ?
@Yogus what do you think?
@Duikboot Can you please elaborate what is that project for ?
Ohk I am already reading that
06:50
morningz
good mornings :)
user652649
@hakre hey, thanks... i guess "english support" should be a "stable feature" xD
07:10
@Wes Just seeing Strato has also an Italian and British arm: strato.it - you can find them when you scroll down at: strato.de/server "STRATO in Europa" - why not ask there if the hosting is in germany? Then it's likely the same products as on the German website.
user652649
O_O great, never heard of them
Years ago Strato was crap. But then their management changed and one of the biggest IT firm in germany took them over and their products have really improved. They are pretty professional right now. I mean german style professional.
One downside for their hosting is that you can not connect domains your own.
But that does not apply to VPS, just for the webhosting products.
user652649
apparently in the italian version of the site there isn't any reference to anything than hidrive (free 5gb space)
@Wes I see. More or less just wanted to point out that I think they are open for business across europe. As my company contracts them, I'll shoot them an email if they offer english support.
user652649
thank you, let me know :P
07:32
echo "Message sent!";
// Redirect:
header('Location: http://localhost:8888/be.webapp/src/app/index.php?page=success-registration');
so why u no work! :(
user652649
independently by the fact that doesn't work, what's the point of writing a "confirm message" that will never be displayed, since a redirect will be made? xD
I just want to redirect,
echo "Message sent!";
header('Location: http://www.example.com/');
"Please port my application to the Google Maps V3 API"
But the echo is called but not the header.
user652649
07:40
again. redirect = instant change of page, means that "message sent" will never be displayed
where is your app @Pekka웃
Yeah but I don't have to show that echo,
If the script get on that point I need a redirect.
Works perfect.
Exit() -> 'Output a message and terminate the current script.'
user652649
@Duikboot it doesn't
07:45
hi
user652649
when you open a page you are actually getting something like this pastebin.com/e9i4yTgW
can someone pls help with this stackoverflow.com/questions/16956125/…
user652649
@Duikboot but what you're doing is more similar to pastebin.com/zSiKXx2V
@Duikboot Problem solved?
user652649
07:47
so you have to set header()s before ANY actual output
Ok, I think I get your point but I have registration form and a users receives a mail if the fields are filled in correctly. When a user clicks regsiter and the record is stored in the database, I want to redirect to an information page.
user652649
same with setcookie() (which sends an HTTP header as well)
What is your way then of redirecting a page in the situation I am dealing with currently if I may ask?
user652649
if you are going to instantly-redirect to another page there's no need of output, so you should just avoid any echo. "logic" has to be before any output and it should be independent by future outputs. you can't mix html with the actual program's logic...
@YogeshSuthar I was referring to the question linked in my above, which amounted to a rewrite request (which is why I think it should be closed).
08:01
HI.. any mysql expert here??
Good morning can anyone help in a wordpress issue?
I will look at your wordpress..:)
mornign
Thanks. So i display the categories of my posts as a dropdown list. All parent categories shown well and bellow them (if exists) they are shown the child,now is like that:
Parent Category
Child Category

How can i make it to be like
Parent Category
Child Category

I mean how can i add a rule to the loop so to define that? Or in general how can i do that?
In the second there is a big space
like
Parent Category
<big space>Child Category
do you want to hide parent???
08:12
foreach($categories as $category){
    $category->renderAsParent();
    if($children = $category->getChildren()){
        foreach($children as $child){
            $child->renderAsChild();
        }
    }
}
Something like that assuming you only have one tier of children
If you need multiple tiers, make a recursive function
(actually that function is fairly recursive, just instead of renderAsChild() call this function on the child)
No i don't want to hide parent. Just to shown better the child. To stylish or something
@LightningDust Aha i see, so i am going to try it now. But now i use the wp_list_categories();
I supoosse that it's diffirent
but what do you mean here? if($children = $category->getChildren()){
it's the first use of children you haven't assign a value so what is going to compare?
@Mhche - Sorry, I didn't read that you're using Wordpress, those functions were pseudocode functions
@LightningDust Ah ok i thought it was ready. Thanks anyway!
@Mhche if($children = $category->getChildren()) is a common way to test a function which can either return useful values or false.
It is functionally equivelant to:
$children = $category->getChildren();
if($children){
Aha i understand. Yes it's true.
You'll see the latest netbeans, for example, throw a warning about 'variable assignment within conditional'.. you can safely ignore it. I just hate those little yellow warning triangles...
08:39
But it's one less line of code.
@Jimbo haha that happend to me now that's why i asked for
actually it's not totally wrong the warning but yes you can ignore it
Mornings
08:52
hello i want to create a form inside a whileloop
is that possible?
morning @DaveRandom
@Fasilkk A developer
pastebin.com/CjjtiiJ4 Is there an easy way to var_dump / / print_r
all emails only?
yes. i am a developer..:)
I want to use the in_array method for searching for the same email adress
08:56
@Duikboot There is a function in the upcoming PHP5.5 that would let you do this as a one liner, but for now you will have to loop and create a temporary array
Allright! :-)
Actually you can still do it in a one liner using array_map()
But that's just moving the loop into C instead of PHP
while($rw=mysql_fetch_array($abc))
{
echo $rw['Option1'];
echo "<br>";
echo $rw['Option2'];} how to get the option 1 and option 2 in theform of radio button
@DaveRandom Is that the array_column()?
08:59
please help e

« first day (964 days earlier)      last day (4210 days later) »