How go to authorize method ASP.NET
I'm testing Basic Http Authentication. I try go to a page, But when I go
to "books/get", I see nothing. Why? What I should add?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Net.Http.Headers;
using System.Security.Principal;
using System.Text;
using System.Threading;
namespace WebApiTest.Controllers
{
public class BooksController : Controller
{
[Authorize]
public String Get()
{
String res = "Hello";
return res;
}
public ActionResult Index()
{
return View();
}
}
}
Boonstra
Thursday, 3 October 2013
Wednesday, 2 October 2013
how to increment value of a column up to specific range for values in other column?
how to increment value of a column up to specific range for values in
other column?
The existing table is like:
tmc speed
ABC 55
DEF 55
I want to create a table like the following one using the existing table
in SQL Server 2008:
tmc speed
ABC 55
ABC 56
ABC 57
ABC 58
ABC 59
ABC 60
DEF 55
DEF 56
DEF 57
DEF 58
DEF 59
DEF 60
The code I developed is not showing me the exact result I want. Any help
will be highly appreciated.
other column?
The existing table is like:
tmc speed
ABC 55
DEF 55
I want to create a table like the following one using the existing table
in SQL Server 2008:
tmc speed
ABC 55
ABC 56
ABC 57
ABC 58
ABC 59
ABC 60
DEF 55
DEF 56
DEF 57
DEF 58
DEF 59
DEF 60
The code I developed is not showing me the exact result I want. Any help
will be highly appreciated.
Objective C adding C++
Objective C adding C++
I have been given some C++ classes to incorporate into my Objective C
project. I've never done this before, so I have to ask:
Is there something special I need to do or can I just rename the .cpp to .mm?
What about importing (or including) the .h file? Anything special I need
to do there?
Just baby steps here. Thank you.
I have been given some C++ classes to incorporate into my Objective C
project. I've never done this before, so I have to ask:
Is there something special I need to do or can I just rename the .cpp to .mm?
What about importing (or including) the .h file? Anything special I need
to do there?
Just baby steps here. Thank you.
PHP if statements with multiple values
PHP if statements with multiple values
Is there a shorter way of writing this?
<?
if($_GET['id']==1 ||
$_GET['id']==3 ||
$_GET['id']==4 ||
$_GET['id']==5)
{echo 'does it really have to be this explicit?'};
?>
Something like this perhaps?
<?
if($_GET['id']==1 || 3 || 4 || 5){echo 'this is much shorter'};
?>
Is there a shorter way of writing this?
<?
if($_GET['id']==1 ||
$_GET['id']==3 ||
$_GET['id']==4 ||
$_GET['id']==5)
{echo 'does it really have to be this explicit?'};
?>
Something like this perhaps?
<?
if($_GET['id']==1 || 3 || 4 || 5){echo 'this is much shorter'};
?>
Pointers in B Tree
Pointers in B Tree
I read about B trees and understand their input, delete methods. I read
with an introduction like this:
When we build structures on disk, we must deal with certain realities of
access and transfer time:
Random access to disk typically requires on the order of 10-20 ms access
time to position the head and wait for data to come up under it.
Once the head position is right, data can be transferred at rates in
excess of 1 million bytes/sec.
Observe, then, how total transfer times behave for different size blocks
(assuming a fairly fast 10 ms access time, and 1 megabyte/sec transfer
rate)
So, B Tree Data Structure is made for serving from disk ( which is what
makes them great for Databases ). But when I tried to implement it, I hit
this problem.
Normal B Tree diagrams shows pointers to child nodes which then descend
down to leaves.
But how do I make pointers on the disk? Is it like a file name ?
I read about B trees and understand their input, delete methods. I read
with an introduction like this:
When we build structures on disk, we must deal with certain realities of
access and transfer time:
Random access to disk typically requires on the order of 10-20 ms access
time to position the head and wait for data to come up under it.
Once the head position is right, data can be transferred at rates in
excess of 1 million bytes/sec.
Observe, then, how total transfer times behave for different size blocks
(assuming a fairly fast 10 ms access time, and 1 megabyte/sec transfer
rate)
So, B Tree Data Structure is made for serving from disk ( which is what
makes them great for Databases ). But when I tried to implement it, I hit
this problem.
Normal B Tree diagrams shows pointers to child nodes which then descend
down to leaves.
But how do I make pointers on the disk? Is it like a file name ?
Tuesday, 1 October 2013
Access igraph R objects from Python
Access igraph R objects from Python
I have a graph object created with the igraph R package. If I understand
the architecture of the igraph software package correctly the igraph R
package is an interface to use igraph from R. Then since there is also a
igraph Python interface I wonder if it is possible to access my igraph
object created with R via Python directly. Or if the only way to access
and igraph R object from Python is to export the igraph R object with
write.graph() in R and then import it with the igraph R package.
I have a graph object created with the igraph R package. If I understand
the architecture of the igraph software package correctly the igraph R
package is an interface to use igraph from R. Then since there is also a
igraph Python interface I wonder if it is possible to access my igraph
object created with R via Python directly. Or if the only way to access
and igraph R object from Python is to export the igraph R object with
write.graph() in R and then import it with the igraph R package.
Custom URL in PHP
Custom URL in PHP
I am trying to create custom profile URLs using PHP.
I currently have the following URL:
http://mysite.com/profile.php?user=1
where user_id 1 is Kyle Hagler in the database.
I would like to allow access to this same page through the following url:
http://mysite.com/kylehagler
I am trying to create custom profile URLs using PHP.
I currently have the following URL:
http://mysite.com/profile.php?user=1
where user_id 1 is Kyle Hagler in the database.
I would like to allow access to this same page through the following url:
http://mysite.com/kylehagler
Subscribe to:
Comments (Atom)