« first day (423 days earlier)      last day (4750 days later) » 

00:01
0
Q: "Uncaught SyntaxError: Unexpected token (" but there is no error

rlemonI'm authoring a simple userscript that will give the backspace button navigation control like in windows (specifically this is for linux users) for Chromium browser. This script was working, then I made a few alterations to it (very simple stuff, commenting, tabbing, making it pretty), and now ...

where is an example of this style in question
Hmm, I can't find anything wrong with your code Rlemon. I ran it through the Chrome, turned on all break points, paused code execution at error's breakpoint, and inspected the document.head element and the script variable. Both valid. Executed the exact same code document.body.appendChild(script) and it worked perfectly. Doesn't make sense it would work in the console but not on the page.
@rlemon looking
could it be the way i include it on the page
i did change EmbedCodeOnPage("(function() {" + fn.toString() + "})();"); from EmbedCodeOnPage("(" + fn.toString() + ")()");
can you follow up with a console.log(script) right above document.head.appendChild
00:07
ohh you gotta be kidding me... that was the problem.
EmbedCodeOnPage("(function() {" + fn.toString() + "})();"); // fails
EmbedCodeOnPage("(" + fn.toString() + ")()"); // works.
@rlemon Most likely. The syntax error is the missing function, but the syntax error was thrown when you applied the code to the document.
RT @humphd: New post: Implementing Mouse Lock, conclusion - http://vocamus.net/dave/?p=1393 We're done! I hope you enjoyed these as much as we enjo ...
RT @brianleroux: Wherein jQuery's base API is proposed to be added to the DOM http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/1454.html
RT @tomdale: SproutCore 2.0 is now Ember.js – http://emberjs.com/
RT @attasi: A little experiment I threw together: Interactive CSS3 Lighting Effects http://attasi.com/labs/ipad/
RT @pamelafox: If you're thinking of timing your JS, I wrote up the bit of code I use here: http://www.everyday.im/learning/phonegap-loading-performance.html
RT @0penWeb: Open Web ♥ weekly: if you have <time> and rich content, you could annotate your videos with WebVTT http://t.co/5ysgNk ...
you are just trying to throw an anonymous function in out of the blue
fuck off @feeds
That feed is annoying. >.<
00:08
EmbedFunctionOnPageAndExecute(function() {
line 46 add ()
ok updated the question.
}());
make that line 46 and try
you see you are just doing (function () { function(){ } )();
invalid
but why?
do (function () { function(){ }() )();
because you are just dropping in an anonymous function and not executing it
you cant do that
user1385191
@Feeds NOOOOOOOOOOOOOOOO
user1385191
00:11
say no to selectors
user1385191
populism at work
better (function () { (function(){ })(undefined) )(undefined);
ohhhh i seeeee.
ok, sorry - long day, took me a second to understand what i was doing there.
also give me the answer on that, not that other dood who stoled my answer
i'm just so used to functions like setTimeout executing the fn for me.
lol, will do boss.
:P
00:12
thanks bruddah
lol, you can get your check in 2 minutes
(stupid timer)
im working on my internet points
much appreciated
@MattMcDonald leave a comment on the thread
@ThomasBlobaum so then when i had ( fn.toString() )() is was really ( function() { } )();
Saying "Fuck selectors, we have GEBI & GEBTN"
user1385191
00:16
ooo new ping icon(s)
Like Thomas said, but to add on, the syntax error wasn't the calling from the anonymous function, but the lack of parentheses around the nested function.
(function() {
function(){}();
});

to:

(function() {
(function() {})();
});
Hehe, I'd like to see how the JavaScript engine parsed (){}()
@rlemon thats right
ok so what i really needed to do was back out that one change :)
i'm not happy until i understand why my code failed - not just apply the fix and move on.
@Mikett actually he was just missing the ending (), which caused the cursor to error right after function (so he say "(" as the location of the error)
you can run function () {}()
ahhh - all patched up now.
github.com/rlemon/UserScripts/blob/master/Backtrack/… <- if anyone else gets angry when their backspace doesn't control nav.. what can i say i used to be a windows guy
00:21
actually dont listen to me, function () {}() doesnt work everywhere
ORLY? xD I just tried it. I thought you couldn't, and when I entered the following into the Google Chrome Console:

function(){console.log(1);}()

It threw the following error:

SyntaxError: Unexpected token (
yeah apparently not a good idea lol
xD So my odd formatting habits sometimes do come in handy. I add parenthese around almost all anonymous functions (unless in a object) and objects.
yeah you should..
in node.js function () {}() works as expected, tis why
But because of that habit I often type:

var example = ({});
00:25
been doing too much node
@Mikett A lot of the time, a function wrapped in parens is a signal that the function is self-executing.
People shouldn't expect that to be the case all the time though. They should verify.
@ThomasBlobaum only needs to work in chromium on linux / anything else i could care less about
:2086219 People here don't like my formatting.

if(condition)
    {
      var example = 123,
            abc = "example";

      console.log(window[abc] === example);

      window.example = example;

      console.log(window[abc] === example);

      /* Short comment example. */

     /*
      * Long
      * comment
      * example.
      */

      // I try to avoid comments like this due to the
      // possibility that the file lines are joined.
    }

I have a habit of skipping four spaces then two.
it's a personal userscript.
00:33
@Raynos about to troll this article with nodequery ideology gigaom.com/cloud/node-js-and-the-javascript-age/#comments
damn why cant i find where to add a new comment
bracket on a new line is trolling
@ThomasBlobaum I only add brackets on new lines for if statements mainly, sometimes for and while statements as well, but that is all.
if (true) {
    // write like this
}

else if (false) {
    // do things
}
4 spaces everywhere
new lines after curly bracket blocks
one space between everything on the same line
@ThomasBlobaum Why a space between the statement and the condition?
one space between everything on the same line
Is it valid to do this?

} else if(condition) {

}
00:42
@Mikett (Don't tell anyone, but I put my curlies on a new line in most situations)
function doAthing (param) {
    return true
}

if (doAthing()) {
    // other things
}
see now?
try {

} catch(e) {

}
your if's, fors, etc are the same as your functions
if(condition) {

} else if(condition) {

}
try {
    // this may err
}

catch (e) {
    // oh chit
}
00:44
>.<
this is how ninjas write
user1385191
try {
	//insecure code
} catch (e) {
	//please call me, IE
} finally {
	//always call me
}
Okay, but could be better.
Ninjas? I'm not two. xD
I'm just use to my style.
definitely better than new line per bracket stuff
00:46
Hey there
ninjas = most active node.js userland open source contributors
default in visual studio is curly bracket on a new line
user1385191
ninjas = deluded amateurs
2
user1385191
self-proclamation of expertise is cancerous
its not dilluted or delusional to make 6 figures doing javascript
00:47
Please anyone, help me. I have css file that has over 2000 lines. Is there any way to create mini js function that will fetch only neede selectors from this .css file and generate new css?
I think I finally know why I added a new line for the brackets. I couldn't remember why, but I remember now. The brackets serve as a new line. That blank line serves as a divider when you look back at the code because the code inside of the if statement can get really nasty a bunched up. If you're scrolling through a big bunch of code, a empty space really sticks out.
It keeps the code away from the condition in which calls it.
if you like your style, go ahead and roll with it
any suggestions about my problem?
@epicsyntax lol you build that tool and it will be popular, no doubt, best i can offer is a bookmarklet that half works (it tells you what css isnt being used)
You're the very FIRST person to tell me that without any negative feed along with it. xD
00:49
javascript:(function(d,t){var j=d.createElement(t),s=d.getElementsByTagName(t)[0]||d.getElementsByTagName("lin‌​k")[0];j.src='http://driverdan.github.com/cssess/cssess-min.js';s.parentNode.insertBefore(j,s);})(document,"script");
user1385191
the newline isn't the problem
@Mikett but be aware often work places require a certain syntax style
user1385191
the spacing after the newline is
@Chris That sucks.
my idea is really basic I think. It searches html for selectors, and creates new one from only fetched selectors
00:51
@Mikett thats almost precisely the reason i'd recommend you go back and digest the style i showed you
user1385191
food for thought:
How about I write my way and then convert it to their way before saving the file? xD
user1385191
style tips from the most important software project in computing
@epicsyntax run this javascript on a page javascript:(function(d,t){var j=d.createElement(t),s=d.getElementsByTagName(t)[0]||d.getElementsByTagName("lin‌​k")[0];j.src='http://driverdan.github.com/cssess/cssess-min.js';s.parentNode.insertBefore(j,s);})(document,"script");
00:52
@Mikett I agree it can be annoying but in the end its just changing a habit, once you do it a certain way for a while you will probably prefer that way. As you do now with your style
on adressbar??
yes a bookmarklet
...
@MattMcDonald @ThomasBlobaum fucking anti patterns
everyone knows you dont use try catch in javascript
@epic_syntax would sitepoint.com/dustmeselectors this help
@Raynos Here comes all the negative feeds. >.<
00:54
If you parse JSON you try catch or you get trolled.
--
[04:53:45.552] GET /driverdan.github.com/cssess/%E2%80%A6 [HTTP/1.1 404 Not Found 544ms]
@rlemon this is too old extension that doesn't work with current version of firefox
@Mikett what do you expect
dustme no longer works
your doing it wrong, you want me to not tell you?
but it would be nice
@Raynos the point was the styling anywho
00:55
hrmmm. maybe if i get the time over the next few days i'll try to write something like dustme for chrome.
promise you will spam it on the internet enough so that i can find it when i need it.
@Raynos Actually yes. Every comment you have is either negative or just insulting. The conversation was actually going fine without all the negative impulses.
yup
try catch is bad
and after downloading the source this wont actually be that bad.
00:57
sometimes however, you have to use it
Exactly why is it bad?
dont just get all willy nilly with it though, use it when there is no other solution left
Exactly why is instanceof bad too?
anyways - bbl
because you might have an instance of something but instanceof is clueless
so it doesnt do what you think it should do
01:01
You mean like:

$("body") instanceof jQuery // True

But

$("body") instanceof Array // False?
why is try catch bad? @Raynos can explain that one
@Mikett OO in JavaScript worries more about what is in objects, not what they are.
<aside>You might have a problem if you go to fold laundry, and can't find a place to put your beer</aside>
I understand. Like how function arguments aren't an instanceof a Array, but an Object.

So what about try {} catch(e) {}? ... Raynos?
There are a couple things about try/catch:
Care to elaborate?
01:05
1) It creates a scope that doesn't follow normal scoping rules (the catch block)
2) Utter misuse: Empty catch blocks serve no purpose other than to suppress errors caused by faulty logic.
Those are my qualms with it. There may be others that I'm unaware of.
try { fsdgsdfb } catch(e) { console.log(this); }

The console logs the DOMWindow.

(function() { try { fsdgsdfb } catch(e) { console.log(this); } }).call(jQuery);

The console logs jQuery.

Is this problem in more older versions?
@RyanKinal Don't most use it for that exact reason due to errors stopping scripts from continuing their process? This isn't always good, but I agree they should at least log the errors.
@Mikett Right. It doesn't hide the upper scopes, but it creates a new, lower scope, which basically only includes e. And it's created at runtime, which means efficiency issues.
@Mikett Right. But it's usually better to be checking for properties. And console.log shouldn't be in production code anyway.
try
{
    /*
        do
        lots
        of
        things
        up
        here
        where
        an
        error
        might
        be
        thrown
    */
}
catch (e)
{
    // an error occurred somewhere in the try block
}
It just doesn't make a lot of sense
I'd rather have a useful error in my console than whatever I decide to log
I guess I understand. ^.^
Of course, I might be biased in this because my coworkers wrap every function body in a try/catch -_-
But you can log the same exact error object as that of which would have been thrown anyways.
If you've ever inspect a jQuery example on the API jQuery website, their examples are also always in a try/catch block.
01:19
@RyanKinal however proper use is for some errors that might occur that is not in fault of the program. For example a sudden disconnection.(Broken link, remote computer restarted, network down). Specially for NodeJS.
Agreed. Hence the previous example of JSON parsing, put forth by @ThomasBlobaum
@RyanKinal Try this game I made Ryan.
@RyanKinal I want your opinion.
RT @tobie: @pamelafox script files are downloaded, lexed and parsed in parallel. What you're measuring here is the execution time of jQu ...
01:41
@Mikett Not bad. The code seems like it could use some further organization. Regardless of style, I would have a hard time finding my way through that (though that might be mitigated if I had a better understanding of its structure)
Really, though, it's pretty solid
Browser detection is usually not recommended - it can provide false positives in some situations.
Did you use a actual on the page console, or did you view the sources? The game object kinda builds itself.

I know it does, I often build onto jQuery's browser detection to filter out iDevices and chrome from the ".safari" property it offers.
@Mikett I used Chrome's dev tools
As for handling browsers - feature detection, rather than browser detection, is recommended. Basically, if you want to use a particular feature, check for its existence first. If it doesn't exist, use an alternative.
Try inspecting game.master.events. The query property will show events the game has set. The game uses that event object all throughout the game. (Not to be confused with game.events which I poorly named.)
I only checked for the existence of "webkit" in the users userAgent. All webkit browsers will run that game much smoother compared to FireFox and IE.
Fair enough
The notification only appears if the user isn't using a webkit browser, so... Pretty accurate. xD
01:48
/o/
\o\
/o/
\o\
But really, the organization of objects is pretty good. The hierarchy might be a little deep at times, but it's not terrible.
I'm having friends make a few images for the game so I can get those space invader images out of there. The space invaders were just a test pilot for the meantime.
I was really talking about source organization. I would hate to search for a bug in your code.
@Mikett guess what :D
Don't touch the bloody userAgent ¬_¬
Thanks for the compliment, I used marquees as much as I could to avoid JavaScript looping for animations.
What Raynos?
@RyanKinal I was having troubles at first with the onclick event target being the haircross instead of the vector image, but I got over that by adding a transparent image over each vector image and giving the transparent image a higher z-index. As you probably noticed, each element is given a unique ID which is used to refer it to a JavaScript object that contains info and possible actions to be taken on the target.
@RyanKinal I need to create more levels for the game though. xD I like the intro level. It almost uses the full extent of the levels capabilities. All the levels are stored under game.master.data.levels, but secretly, the intro in stored with a negative index. game.master.data.levels[-1]. Makes it easier for the game to refer back to level one without going to the intro.
01:57
@Mikett I recommend you rewrite the entire thing with everything you've learned
Use multiple files, organize the code nicely
etc.
Is this bad practice?

var example = ({
  setup: function() {
     /*
      * Prepare the object in
      * ways that couldn't normally
      * be done by referring it.
      */

      delete this.setup;
       return this;
  }
}).setup();
I'd call that an anti pattern
@Raynos You can recommend all you want.
What do you mean anti-pattern?
var example = (function _setupExample() {
     ...

     return {
         ...
     };
}());
thats an anti pattern
01:59
@ThomasBlobaum true, that's also an anti pattern
Anti pattern... Never heard of it.
Ideally you just use example = { ... }
@Mikett It's a bad pattern. It's an example of what you shouldnt do
var example = {
     foo: function () { return {} }
}
fucking so edit box
@ThomasBlobaum why you troll
You know return from a block statement is trolls
But it works so well when you just want to return something without saving it to a variable then editing it then returning it. It can all be done from within itself, and this way you can use this to refer to itself.
02:01
stop talking or i wont be able to edits
i hit return instead of shift
@Mikett ... don't you see that delete this.setup; is evil?
Nope. xD
What's the point of creating something that deletes itself
Fine, I'll remove that line, just for you... Happy? xD
Does not suggest to you that it should never have existed?
@Mikett I'm trying to give you advice :\
02:02
The setup function setups up other properties within the object that couldn't otherwise have been added by referring it.
You know theres a nice pattern for this right?
You can define a constructor or a "class"
and create an instance
I've done that before. To much work.
I used it in that JSFiddle demo I showed you for that game map, remember?
It is the same way jQuery works. I know.
var example = ({
  target: null,

  setup: function() {
      this.target = document.head;
      delete this.setup;
       return this;
  }
}).setup();
...
var example = {
  target: document.head,
};
It was just an example.
Whats wrong with
var example = {
  ...
};

/* manipulate example */
Why does that manipulation logic have to be in a method
02:08
I prefer the other way because it can all be manipulated in one single reference.
@Mikett i see what you are tryign to do
var example = (function() {
  var example = (function(argument) {
    return this.prototype.init(argument);
  });

  example.prototype = ({
    init: function(argument) {
      /* Manipulate Properties Here. */
    },

    method1: function() { return 1; },
    method2: function() { return 2; }
  });

  example.prototype.init.prototype = example.prototype;
   return example;
})();
var a = new example();
  console.log(a.method1()); // 1
  console.log(a.method2()); // 2
Oops, forgot to add the `new` operator.

`return new this.prototype.init(argument);`
too much
Grr... xD Now you see why I prefer the object.
I could have use the method above for the game, but I just prefer the object better.
I messed up again on that anyways. It was suppose to be:

return new example.prototype.init(argument)
its okay
the problem is in so many closure, we can have this same thing in far less code
02:15
I like how arguments inside a anonymous functions are preserved in the scope forever.
(function() {
  var abc = 123,
      example = (function() {
    return abc;
  });

  window.example = example;
})();

window.abc = 321;
console.log(example()); // 123
Is there a easy and simple way to pass code (big code) to a new window ?
<script typt="text/javascript" src="yourscript.js"></script>
this.prototype is always wrong
hi everyone
I know Raynos. I made a mistake. I stated it two of my posts up.
02:25
o/
can some throw some light on how 'this' gets translated in backbone view when you type this.model.toJSON() so how does it know which model to go and grab the data from ?
02:36
thomas blobaum:
Raynos?
this is the object on which the method is called
or it is global
or it is undefined
if some other place in your backone view you set this.model = new whateverModel()
then inside that view's methods this will reference the same place and you can use this.model
lovely thanks
that is also why you have to use bind and bindAll, for places where this is undefined
I'm thinking of turning a few methods that I often use into a simple JavaScript instance. It'll be better than having a whole bunch of global functions load. Refer to all the tools in one simple instance.
I wonder how Sizzle works in IE where document.querySelectorAll isn't available.
02:54
0
Q: Chrome: High memory usage for certain tabs. Memory leak?

RigI have left an instance of Chrome open for the last 4 days with several app tabs pinned and have noticed three sites that have had quite extreme memory foot prints. This has not been happening for IE and Firefox. The memory foot print of those tabs and the rest of my apps caused my machine to com...

underscore mixins arent a bad place for such things @Mikett
Well I have a type function I use in most of my projects that is really accurate compared to the normal Object.prototype.toString.call(target) is. It uses the Object method, but it also does a few tests to tell the difference between elements and objects, the document, the window, normal objects versus custom instances, ect. Kinda like instance of. I also use a function called sLocal which makes quick work for localStorage tasks.
03:15
sLocal(key, value)

If only the key was supplied, it returns it's value. If a value was supplied, it sets the value and returns true or false depending if it was successfully added. If the value was a blank string, it removes the key from the local storage and returns a true or false value.
you made a little god function
Uh-oh. Little god functions tend to gain followers, and grow into large, vengeful god functions.
God function? xD It wasn't all that advanced, I still need to add tweaks to make it die silently. The type function just tests situations and returns a value accordingly, if nonvalue was found, then it returns the value supplied for Object.prototype.toString.call(target).
You're making god die silently? That's deep, man.
god function = something that does vastly different things based on marginally different input
its usually fine unless you are coding in a group, and then you will get your kool-aid taken away and have to sit in a corner for a while
03:25
jQuery == god
> true
O_O
@ThomasBlobaum like jquery's $()
Oh! Then yes, it is a god function. xD I tend to make a lot of them. It never detects if the localStorage property is even available, so it throws errors in IE. So I need to tweak it so the almighty god function dies silently.
I have a dumb javascript question, involving [object FormData], if anyone wants to humor me. Namely, how do you parse it? I haven't been able to find a thing about how to do so.
@tereško yes
but jquery is one that everyone can bother to learn
I've also made an XML based database function for Windows Computers. Sadly it is ONLY available for Internet Explorer and local computer software. It has it's own instance though. Makes XML manipulation easy.
That is one of my projects that uses that type function I was talking about. It has a two different type of database options. Default mode, and Advanced mode. In advanced mode you get direct access to the XMLDOC. Manipulate it with pure JavaScript, and use the save method to store the data. The default mode enables a few extra methods. Add, Get, and Remove.
The default mode uses two major functions called encode and decode. Encode takes a value, gets the type, makes a new XML element, stores the type to a attribute and stores the object A's it's value. It stores objects and arrays as a element with child nodes. (The child nodes are also encoded by the same function.)
03:35
GIANT WALL OF TEXT
Decode takes the element, reads the type attribute and decodes the content accordingly. Since it does all this, if you save a function in the database, then use the get method, you won't get a string, you'll get EXACTLY what you stored. (Thanks to a little try catch and eval.)
"Sadly it is ONLY available for Internet Explorer and"
i read the whole thing but should have stopped right there
xD It would work with everything but only IE and local files supply the script with ActiveX access.
...
Person = Backbone.Model.extend({ url: 'get_person.php' })
Person = Backbone.Model.extend({
url: 'person_data.php'
});

personCollection = Backbone.Collection.extend({
model: Person,
url: 'person_data.php'
});
if i call pc = new personCollection(); pc.fetch(); would my model be populated or do i have to initialize variables to null inside my model first ?
03:51
@ThomasBlobaum ...
a lot js questions are all about jQuery
I'd love to help, but before you came I've never even heard of Backbone.
ahh, i dont think i was following you
I don't think there is any way to access ActiveX API's in Chrome. :/
@Mian_Khurram_Ijaz no,you world not.
Hi. Does anyone here have experience with JavaScript / Node.js?
Thomas, I think?
thats ie only as far as i know
is JS / Node.js meant only for real-time apps or can be used to build something like Flickr or YouTube too?
Haha, it is ashamed though, I put a lot of work into that Database function.
Hey Thomas, I think these Nodes questions are for you.
04:22
node.js can do anything
so yes it can
@ThomasBlobaum Does it do it as good as (or better than?) Python or PHP?
a computer is as fast as its code, node.js can run almost as fast as an equivalent C/C++ app, so its far faster than python or php
python does a few things just as fast, like regex
Nibbles on popsicle, watching Thomas answer questions about thinks I know nothing about. o3o
okay. One last thing...
@ThomasBlobaum People often say it. Most build an app quickly in Python or Ruby, and then optimize it with C/C++ code (replacing the existing code or something, idk) where necessary in order to scale. Can the same be done to a node.js/JS app too?
or would it not be necessary at all? Is JS on server-side considered as a low-level language as C/C++?
its already done for you with libuv and v8
04:32
Server-side JS. Now only if it could be used on website servers.
@ThomasBlobaum so, you mean to say... I need not consider another server-side language?
its not as fast overall
shell?
@ThomasBlobaum (I meant, for web programming)
okay, okay, I have one interesting / silly question
up to you?
Speed of coding: Consider that I know both C++ and JavaScript (+ Node.js) just as well. In which language will I be able to code faster?
The thing is, I heard that people have coded websites with C#, but why aren't there many with C/C++?
04:36
node.js is both apache and php
it doesnt do everything apache does, but it takes the same position
as well as php's
okay. A rather general Q... Is it really so much pain to code in C/C++?
Ask your question, but send it A's a reply to her so she hears that beep. xP
* as a
@ThomasBlobaum okay. A rather general Q... Is it really so much pain to code a web application in C/C++?
@Mikett :)
Well I'm heading out, good luck!
@Mikett sure!
05:35
backache with backbone fuc.. the documentation is only meant for people living on mars
hi..Im working on Asp.net MVc3..im using JavaScript to show DatePicker.
Below is my Code please check
how much below maan i can 't c any thing
<script type="text/javascript">
$(function () {
$("#dtDOB").datepicker({
changeMonth: true,
changeYear: true
});
});
</script>

<h4>@Html.EditorFor(model => model.Date, new { @id = "dtDOB" })</h4>
but i dont get the Date Picker..
you have to check the .datepicker js syntax i have never used it and also i use PHP not asp but i can help you debug it
$(function () {
$("#dtDOB").datepicker({
changeMonth: true,
changeYear: true
});
sorry type console.log( $('#dtDOB').datepick..... ) ;
and check what do you get in console undefined , or object
put your code snippet on the jsfiddle and save it
Sam M Khan :
?
Hey Man @Khurram..im done with the issue.
there was a problem that was not allowing Datepicker to get viewed...
some Flash code was the reason.
I arranged it and its working great...
Thanks for your concern....
05:56
feeling happy no worries you are welcome
@Khurram <select multiple="multiple" name="Exams">
<option value="NCO">NCO</option>
<option value="Homibhabha">Homi Bhabha</option>
</select>
This is the multiple Selection list im Using in my csHtml in MVC app
this is my code in cs file
string ex = ModelState["Exams"].Value.AttemptedValue;
MY issue is if the user doesnt select any option from the given list and clicks save then an error is thrown as Object reference not Set to an instance of an Object
Ho can i validate that even if the user doesnt select any option from the list then also no error should be thrown.The Database column is set to Allow Null=true
06:19
@SamMKhan Before saving check that and if necessary issue an error to your user and don't proceed saving.
@SamMKhan follow Omeid Herat
06:37
ys i have tried that too, validated in the Model designer.Im using model first method.
How can i check ModelState["Exams"].Value.AttemptedValue
I have used [Required(ErrorMessage="Select Atleast one option")] in the Model to validate.
@Khurram,@Omeid i also have the provision that the user can save without selecting even a single option.
06:50
@SamMKhan if that is optional before reading the value check if it's set then use it.
07:24
@Raynos , im getting "invalid date" again : raynos.org/blog/22 and raynos.org/blog/17
@OmeidHerat: but I didnt found any method to check the list..
morning
07:44
RT @assaf: Zombie.js 0.12.2 is out, support for global options, silent (no console.log), and opacity (jQuery fade in/out) http://t.co/MY ...
0
Q: How to disable hoverIntent in Wordpress 3.3 admin

supertrueI don't like hoverIntent in the new flyout menus or admin bar; to me, it makes my page feel slow. What would be the Wordpress-friendly way to disable hoverIntent (or change its options) in the new Wordpress admin and toolbar? The only place I see hoverIntent in the Admin page source is here: ...

 
2 hours later…
09:33
@tereško I know :(
10:15
Fixed those issues of course
you said that last week too
by "fixed"
i mean fixed the database
0
Q: String manipulations: transform "a-b-c" to "a(b(c))"

NVIfunction dashesToParentheses(str) { var list = str.split('-'); return str.replace(/-/g, '(') + repeatString(')', list.length - 1); } function repeatString(str, times) { if (times == 1) return str; return new Array(times + 1).join(str); } dashesToParentheses('a-b-c') // ...

not the code
emm .. @Raynos , in raynos.org/blog/22it says Thu Jan 01 1970
10:28
\o/
how did I get the datetime wrong
you are really bad at this
damn right I am
I just care really little :\
like I have a massive memory leak
solution -> restart server every few days
@Raynos , you are like a shoemaker with torn shoes
( this is actually a bastardization of latvian proverb )

« first day (423 days earlier)      last day (4750 days later) »