jeudi 30 avril 2015

How to make chosen options in a form change colour

So I have an html code like this

`<center><form action=" " method="get"> <input style="display:inline" type="hidden" name="srtby" value="updated"> <input style="display:inline" type="hidden" name="srtdir" value="desc"> <input style="display:inline" type="hidden" name="__filelist_page" value="1"><img src="/i/i5/fs.png" alt=""><input style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;width:5em" type="search" name="fltr" value=""><input style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important" type="submit" value="Search"> <br><a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;color:#0f0 !important" href="?srtby=updated&amp;srtdir={_$srtdir|}&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="Updated"><b>Updated</b></a> . <a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;" href="?srtby=name&amp;srtdir={_$srtdir|}&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="Name"><b>Name</b></a> . <a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;" href="?srtby=size&amp;srtdir={_$srtdir|}&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="Size"><b>Size</b></a> . <a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;" href="?srtby=type&amp;srtdir={_$srtdir|}&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="type"><b>Type</b></a><br><a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;" href="?srtby={_$srtby|}&amp;srtdir=asc&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="Ascending"><b>Ascending</b></a> . <a style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;color:#0f0 !important" href="?srtby={_$srtby|}&amp;srtdir=desc&amp;fltr=&amp;prpg=10&amp;__filelist_page=1" title="Descending"><b>Descending</b></a> <br><select style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important;" name="prpg"> <option>3</option> <option>5</option> <option selected="selected" class="selected">10</option> <option>20</option> <option>50</option> <option value=" ">all</option> </select><input style="border:1px solid
#ffffff;border-radius:2px;background:#3b5998;color:#ffffff;padding:0 1px !important;margin: 1px !important;font-size:.75em;text-decoration:none !important" type="submit" value="Per Page"></form></center>`

All I want is for the chosen options in the chosen options to change colour




Login to site from iOS app

I found this tutorial on how to do this, and I am trying to get the sample project to work, I think the site might not work for login anymore, but I am not sure http://ift.tt/1zwS7Y6 the sample project can be gotten from the link and the site where the login occurs is this: http://ift.tt/1bIuWid, the site is running but Im not sure it supports the login anymore.

If anyone could confirm this that would be great?

Thanks for the help in advance.




Download link in an ASP.NET Web app? How?

I have no idea where to start with this. I want to make a Resume.aspx page and on that page have a clickable link to download my resume, or even display my resume. I am doing this in a normal asp.net web application and have a resume.aspx page with two content place holders. I don't know where to start. I've looked around and people only posted more complicated ways of doing stuff with downloads. What do I do to supply a possible employer a link to download or look at my resume. please just give me some references to look at or a code example.




Webix form get value

I'm using the JS libray Webix to build a front-end for an application. For login, I'm using their form. http://ift.tt/1GAwoLM

I'm having an issue using getValues() where it returns an undefined. I'll post my exact code.

Any help is appreciated.

<script>
            webix.ready(function(){
                webix.ui({
                    view:"form", 
                    id:'log_form',
                    width:300,
                    elements:[
                    { view:"text", id:"user", label:"Username"},
                    { view:"text", type:"password", label:"Password"},
                    { margin:5, cols:[
                        { view:"button", click:"testLogin", value:"Login"}
                    ]}
                    ]
                });

            });

            function testLogin()
            {
                var suppliedUser = $$('log_form').getValues().user;
                var suppliedPass = $$('log_form').getValues().password;
                console.log(suppliedUser);
                console.log(suppliedPass);
            }
        </script>




Is there a site that loads slowly on purpose?

I'm working on the system that embeds a browser object. One of the requirements is to put a "Please wait" message if the page takes too long to load.

If there a site out there that deliberately loads slowly for the purpose of testing?

I don't care what the content is, I just want it to make 5+ seconds to load.




PHP Vs JQuery Web api2

Well, the title is really bad here, but i had no other way to explain what is happing my server.

I have a normal web api2, new. i installed cross domain and only putted

config.EnableCors(); on webapiconfig.

I have a MailController Which contains this method :

 [HttpPost]//omUrl/{url?}
        [Route(@"~/api/Mail/MailOpen")]
        public void MailOpen()
        {
            try
            {
                File.Create(@"D:\Emails\Alive.html");

            }
            catch (Exception ex)
            {
                // ignored
            }
        }

and run on a web with this host: http://localhost:56212/

So, i am trying to post some data to check cross domain policy and i post with this php code :

<?php 
$url = 'http://localhost:56212/api/Mail/MailOpen';
$data = array('Smtp' => 'value1', 'Subject' => 'value2');

// use key 'http' even if you send the request to https://...
$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

var_dump($result);
 ?>

This code gets to the server and the Alive.html is created, Wait. How can that be i asked my self, i don't have any cross domain policy yet on this controller ?..

So i tryed to run this javascript code :

<script>

 $.get(
     "http://localhost:56212/api/Mail/MailOpen",
     { 'G': "aa94a7cf-7794-41ff-b8d0-fcfe34fcb19c" }, // put your parameters here
     function (responseText) {
           console.log(responseText);

     }

    );
</script>

Which suppose to do the same thing.. but i get this error :

jquery-1.11.2.min.js:4 GET http://localhost:56212/api/Mail/MailOpen?G=aa94a7cf-7794-41ff-b8d0-fcfe34fcb19c m.ajaxTransport.send @ jquery-1.11.2.min.js:4m.extend.ajax @ jquery-1.11.2.min.js:4m.each.m.(anonymous function) @ jquery-1.11.2.min.js:4m.extend.getJSON @ jquery-1.11.2.min.js:4(anonymous function) @ index.html:6
index.html:1 XMLHttpRequest cannot load http://localhost:56212/api/Mail/MailOpen?G=aa94a7cf-7794-41ff-b8d0-fcfe34fcb19c. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 405.

Which is normal, because i don't have any policy yet.

Can any one tell me why the php worked and the jQuery return an error?

Ty all.




Login into 3rd Party Website

I have an app, and I was wondering if it is possible to from this app login into the 3rd Party Site (it is not my site) with the user providing there username and password for that site, in a UITextField, and then send that data to the site? And have that user login, and then some of the user info of that user could be displayed in the app?

Thanks for the help in advance. I am new to accessing web and 3rd parties from app.




Extending prototype on object literal

If I have the following code, why does it return an error saying Cannot set property 'second_prop' of undefined . I thought that you can extend the prototype property and add more variables and methods to the object prototype. Since the two console statements return 'Object' and true, then why does it return an error of undefined. My thinking is, if the 'obj' is an object of type Object, then I should be able to do temp.prototype.newproperty? So then the Object will have a 'newproperty'. But I'm obviously wrong, so there's something I am missing here. Even more, why do I need to do Object.create() when the obj is already an object literal? Isn't it already an object? I'm just looking at some examples and trying to understand this

    var obj = {
        first_property: 'first property'
    }
    console.log(typeof obj);
    console.log(obj instanceof Object);

    var temp = Object.create(obj);
    temp.prototype.second_prop = 'second property'

Output

//object
//true
//Uncaught TypeError: Cannot set property 'second_prop' of undefined

So, why can't i do temp.prototype or obj.prototype?




Log User Into Web Account From App

I have an app, and in this app I want a user to login to a website from a textfield with in the app and then some data from that users account on the website can be displayed in the app. I have taken a look at this Ray Wenderlich tutorial, http://ift.tt/wU3AHD. And it has given me a good start, but this tutorial is a bit out of date I found an updated project that does the same thing here. http://ift.tt/1HVutFB but I am confused about how to put in my url for the page I want to log into and then how to find the username and password fields on that page?

So I am wondering how to log in a user to a website from my app, and just the next step.

Thanks for the help in advance.




Invalid flag to regex error on button click in CodeIgniter

I have a view in which a quiz is displayed using an external js file. When the quiz is completed, I am appending some new html to the screen, including a new button that is suppose to, upon being clicked, send the user to the practiceTask function of my Main controller. However, when it is clicked I get the error:

Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'practiceTask'

Because the code is in .js file, I can't use site_url or base_url, as far as I know. Is this the correct way to do this?

Relevant JS:

$('#imageLocation').attr("src", "");
var html = '<div class="instruction_block"><p class="instruction_text" style="text-align: center; margin-top: 0">You have completed the ' + text + ' test</p><div class="button_placement" style="margin-top: 300px;"><input class="rounded" style="position: absolute; bottom: 0; right: 0; width: 250px;"" type="button" value="Continue to the next task" onClick="/main/practiceTask/3"></div>';
$('#final_message').append(html);

Main Controller function:

public function practiceTask($task_id){

$this->load->model('Main_model');

echo ($task_id);

$json_key = $this->Main_model->getKey($task_id);
$json_key = json_decode($json_key, true);

shuffle($json_key);

$data['test_key'] = $json_key;
$data['task_id'] = $task_id;

$this->load->view('practice_test_view', $data);

}

Any help would be much appreciated!




Mobile device browser not showing full page of a website

the website is www.kazansummit.ru. It is showing properly on a desktop, but some right part of the homepage is not seen on a mobile, even though responsive mode is disabled. The website was created using WordPress. Any thoughts why this might be happening?




Web Form Only Accepts Mouse Input - Requires Users to Enter PIN thru Virtual Keyboard.

I recently started working with a new piece of volunteer management software called Volgistics.

They include a module that allows volunteers to sign in and out for their shifts by accessing their account on a touch screen monitor. The volunteers enter a unique PIN and click the continue button to get in. This is obviously really inconvenient if you have any appreciable amount of volunteers.

I currently have created a set of barcodes, and QR codes that contain the volunteers PIN numbers. The web app will accept the numbers being entered into the text field, but when you click continue, it says the pin is invalid. When I delete the text entered from the barcode scan, and enter the same number by pressing the buttons, it accepts the PIN.

I've already been told that the system is not set up to accept input from anything accept a mouse. But since the numbers are being inputted into the text field - I am skeptical that this is the case. Can anyone help me figure out why this is happening, and a work around to fix it?

I've used several apps on my iPhone that scan the barcode into a web form as the 'scanner' as we will likely be using a tablet for sign in prior to moving to a more advance system.

They have told me that there are no specific security features that reject numbers based on their input method, though the system is not set up to be used with any other form of input device.

Here is a link to an example VicTouch module with useable PINs. http://ift.tt/1dxIo9Y

Any help would be REALLY appreciated!




Need a workaround for no inline video play with iOS (iPhone)

On the website I am working on, understood.org, we have a page where a video plays, then upon ending it starts a javascript game, and then after that game is complete plays another video. This works on all platforms pretty well except for the iPhone. The problem is that on the iPhone it plays the video in a full screen native player it seems, and so the trigger to start the simulation and close the video doesn't work, and instead it skips directly to the next video. This could all be fixed if I could just tell Safari to play the video inline, but I have looked around and seen on numerous questions and forums that this is just not possible. Any ideas? Do we need to use a different video player or something? The example I am working with can be found here http://ift.tt/1I1bECG




Add security login to Web service in JAVA

I've got a web service server which takes a String and returns a string (an easy one).

Also, I've got a web service cliente in another computer who calls the method published in the server.

It works OK!

I've been told to add a security header, but I have no idea how to do it. I need to implement it in the server and also in the cliente. I've read I have to implement a handler but I don't know how.

Could you help me with this?




remember credentials on android Web App

I designed an application for android (i used android studio), which actually has an embedded web site, which was made by me in php. The first screen of the application is a login. I would like to know how I can do to make the system to remember the user name and password, as happens in most of the android applications.




How can i change url name?

I have a web url that look like: http://ift.tt/1AkQhEu.
How can i change this name url to something else?
Just for the appearance.




How to use raw sql Pagination in Laravel5?

    $sql = "SELECT *,earth_distance(ll_to_earth(team.lat, team.lng), ll_to_earth(23.1215939329,113.3096030895)) AS distance FROM team where earth_box(ll_to_earth(23.1215939329,113.3096030895),1000) @> ll_to_earth(team.lat, team.lng); ";
    $result = DB::select( \DB::raw( $sql ) );

Hi , everyone.

This is my Controller code, My question is , how can i use Pagination add into this code to build my restful api ?

The second question , iOS or android will send the "next page" parameter , how to use it and find the next section data ?

If you know how to do it or any open resource in use , please tell me , thanks!!!




How to access a WCF SOAP service with wsHttpBinding from Linux?

I am trying to consume a WCF SOAP service with wsHttpBinding from Ubuntu.

Whatever I try, PHP, SoapUI, Java, I'm running into problems with wsHttpBinding features not being implemented. Changing it to BasicHttpBinding or disabling security features is not an option.

NOTE: It pretty much doesn't matter what language is used. Is there a SOAP client/framework/library that supports all these features and runs on Linux?

I'd prefer a scripting language as this is supposed to run as a cronjob, but right now anything that works is appreciated.

There are similar questions from months/years ago, but they are unresolved or solved by changing the server side, which like I said is not an option here.




Automated execution of a powershell script on Active Directory, Triggered from a web page

I am proposing an idea for a final year project that is basically a virtual environment. I would be using Citrix XenServer in conjunction with Windows Server 2008 R2 and Citrix netscaler to make the server accessible over the web. I would also be hosting a website on the server that Windows is on.

What I was wondering is, would it be possible to trigger the execution of a script on the server from the web page. So basically a user comes along, goes to my website, registers their details. a csv file is then produced based on the details that are input. Then I was wondering is there a way to trigger the execution of a powershell script that would use the csv file to set up the user in Active directory. The powershell script itself is simple its just how I would get it to run is another thing.




Any library to make desktop GUI under Web client [on hold]

Good day!

I am new at web development, so i have a task to make web interface of our product under web (html5\css\js).

So, it is app with: 1.toolbar 2.menu 3.Grid (WPF)

at toolbat some buttons-if you click to it- new window created (contains textboxes,listview,date time label and so on).

So, can i use some lib (maybe WinJs) to make the same app on web?

The client must works without internet connection and sync if connected.

Is it possible to realize? Thank you!




How to suppress missing rows in a pivottable drill down action

Is it possible in icCube version 5.0.2 to have a navigation strategy that drills-down to its children, but only shows children with data (so a NON EMPTY).

I managed to get this working in the previous versin 4.8 using custom MDX but the MDX syntax has changed and my solution does not work anymore!.

Enclosed a picture on the live demo dashboard called "pivottable" indicating what I would like to achieve.

embedded picture

If I verify the MDX that is generated I see a new custom MDX syntax, like:

axis 0 {....}
axis 1 {drill down parent MDX statement}

The text between curly brackets is the drilldown MDX statement. What I want to achieve, MDX-wise, is a NON EMPTY in front of the statement, e.g.:

axis 1 NON EMPTY {drill down parent MDX statement}

Any suggestion how to achieve this is welcomed.

This example can be found here




How to add Code Editor to hold code sample in html

I am a newbie web developer. I am presently designing a personal blog. I am using html, css3 and for functionality i am using angulajs. Now, i have to add a code editor to show sample code in the blog. But i do not find any idea what to use or how to do it. Should i use any Js plugin for that. Any suggestion ???

I have done this using a textarea and using css i can highlight.




French character issue using asp.net web api

Hi all i have the following problem when i make a request to an asp.net web api controller.

i submit the following text: VIDÉO, but when it gets to my controller action the text become: VID�O.

the problem is not when the data is posted to the server because i can see that the json data that is being posted to the server is correct. i tried all variation of the utf-8 character set but still have the same problem.

Thank you very much guys. looking forward to reading your comments.




which is better Bootstrap or Google Polymer

Can anyone give a brief comparison for Bootstrap Vs Polymer, Pros and cons for using it?? and which is best suited with angularjs




Find Where a Cookie is being Created

I want to know where in the JavaScript code a certain cookie is being created or modified. Would that be possible?

Any ideas?

Thank you,




/css/none 404 (Not Found)

Keep getting error on page:

GET http://localhost:8000/css/none 404 (Not Found)

Using laravel with bootstrap, but have no idea where the error comes from.

Have searched the whole project in Phpstorm for the path, but nothing comes up either.

In chrome it says the error comes from:

<!DOCTYPE html>

But when removing that line, it puts the error on another element instead.




406 error with OData service in Visual studio

I have spent the past 6 hours trying to figure out why my odata service doesn't work to no avail. I keep getting a 406 error and I have tried all recommended solutions to no avail. Please help. Below is my code.

public class Person
{
    public int Id { get; set; }
}

public class TestController : ODataController
{

[EnableQuery]
public IQueryable<Person> GetTest()
{
        try
        {
            var persons = new List<Person>(){new Person{ Id= 1}};
            return persons.AsQueryable();
        }
        catch (Exception ex)
        {
            var here = "dd";
        }
        return null;
    }

In my webapiconfig class, I have: // Web API routes config.MapHttpAttributeRoutes();

        var builder = new ODataConventionModelBuilder();
                 builder.EntitySet<Person>("Person"); 
        config.MapODataServiceRoute("odata", "odata", builder.GetEdmModel());

        config.Routes.MapHttpRoute(
            name: "DefaultApi",
            routeTemplate: "api/{controller}/{id}",
            defaults: new { id = RouteParameter.Optional }
        );

        config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

It keeps failing with 406 error. It hits the breakpoint in my controller, but does not return the data. Thanks




mercredi 29 avril 2015

customize or change date in Livezilla

How can I customize or change Date time in the livezila ? or maybe I want to using for example Carbon class.
How?!

my Livezilla version is LiveZilla 5.4.0.2.




Creating responsive web app for different platforms/device

past two days i was searching for a solution for my problem. I searched a lot inside the stack over flow( if I missed please correct me ). It didn't meet my needs.

First of all please let me discuss my problem : I am completely from windows application (C#) background. Currently I am working on a solution (Windows Application) with 54 projects and I am handling a big database(SQL) with more than 600 tables.In this solution we are using EntityFramework and its working very fastly and perfectly.

So my problem is I need to make some reports online (WebPage/WebApplication). For example Purchase reports or Sales reports daily, monthly and yearly basis and these reports should able to run in different Platform/Devices (eg: IOS,Android,Windows tablets or Phones). Especially because of reports I need to apply some filteration to reports, So I need to place controls inside it (eg: from date - To date ..etc)

Most of the time our client will use this on computers, but if they are on site they will use the tablet or Phones. I found one question as same as mine, its here-

Creating an Application for different platforms/device

This question asked on 2012, as my knowledge i know that technologies grows very fast. So I think there is new/better solution for my problem. And in that question they didn't discuss anything about handling databases inside the Application. I am also looking for high performance interface, because the database is huge. Making query against the database will slow down the App performance.

One thing I would like to remind, I cannot change my database. If your kind mentality is going to help me in this situation, please suggest something that able execute/support the SQL database also.

Thank you !




Should I still use API key if client IP white listed

This is my first time writing a public facing web api.

My manager is suggesting not to use API key for a Web API I am writing because we are white listing the ip of the client consuming the api and doesn't think we need to bother with API key (ie extra time and complexity)

I am interested in the opinion of others.

I think we do require API key for the following reasons in DESCENDING order of importance.

  1. Allow tracking and limiting of requests from client based on API key. Their ip may possibly change from time to time but the api key should not. So future reporting of requests would be easier with api key

  2. The whitelisted ip can be spoofed? From the reading I have done I think the fact TLS will be enabled makes this impossible because a handshake between server and client is done so a spoofed ip would cause a failure of this handshake?

  3. He doesn't have a clue and I should ignore him on principle :-)

Does the fact that we are relying on whitelisted ips remove the need for seperate Authentication using the API key (the client has access to all of the api so no need for Authorization)?




Could not find any resources appropriate for the specified culture or the neutral culture.(MULTILINGUAL)

protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Lang"] == null) { 
                Session["Lang"] = Request.UserLanguages[0];
            }

            if (!IsPostBack)
            {
                LoadString();

            }

        }

protected void ddLang_SelectedIndexChanged(object sender, EventArgs e)
        {
            Session["Lang"] = ddLang.SelectedValue;
            LoadString();
        }

private void LoadString(){
            Thread.CurrentThread.CurrentCulture = new CultureInfo(Session["Lang"].ToString());
            rm = new ResourceManager("ASPMultilingual.App_GlobalResources.Lang", Assembly.GetExecutingAssembly());
            ci = Thread.CurrentThread.CurrentCulture;


            btnLogIn.Text = rm.GetString("Login", ci);
        }

here is my code and the resource file i store at App_GlocalResources as Lang.ch-CH.resx, Lang.en.EN.resx and Lang.de.DE.resx.

after I compile it throw me this error and point to "btnLogIn.Text = rm.GetString("Login", ci);".

inside my resource has the name of Login. Anyone can help?




MPDF Failed to Render HTML in Code Igniter

I am developing my simple apps with Code Igniter v 2.2 and latest MPDF for converting my view into PDF. I am already follow this link for tutorial Using MPDF with CI

And I am failed to get the PDF output. :D

I thought the WriteHTML()function failed to render my view. Here's my code for this one

$this->load->library('m_pdf');
$pdf = $this->m_pdf->load();
$html = $this->load->view('cetak', true);
$pdf->WriteHTML($html);

But when I change the $html variable into HTML tag like this, it works.

$html = " <!DOCTYPE html>
      <html lang='en'>
      <head>
      <meta charset='utf-8'>
      <meta http-equiv='X-UA-Compatible' content='IE edge'>
      <meta name='viewport' content='width = device-width, initial-scale = 1'>
      <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
      <meta name='description' content=''>
      <meta name='author' content=''>
      <link rel='icon' href='../../favicon.ico'>

      <title>Home</title>

      <!-- Bootstrap core CSS -->
      <link href='http://ift.tt/1duSt7v' rel='stylesheet'>

      <!-- Custom styles for this template -->
      <link href='http://ift.tt/1GxyuMv' rel='stylesheet'>

      </head>

      <body>
      <div class='container'>
      <div class='header clearfix'>
      <nav>
      <ul class='nav nav-pills pull-right'>
      <li role='presentation' class='active'><a href='#'>Home</a></li>
      <li role='presentation'><a href='#'>Logout</a></li>
      </ul>
      </nav>
      <h3 class='text-muted'>King Jim Indonesia</h3>
      </div>

      <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
      <strong>Execute time : {elapsed_time} seconds</strong>
      <a href='http://ift.tt/1Gxyvjw'>Cetak</a>
      <div class='row'>
      <div class='col-md-4' style='border: 1px solid #e1e1e8; margin-bottom: 5px;'>
      <table style='width: 100%; color: #0060f1'>
      <tr><td colspan='2' class='text-center' style='text-decoration: underline;'><strong>PT. KING JIM INDONESIA</strong></td></tr>
      <tr><td colspan='2' class='text-center' style='text-decoration: underline;'><strong>KUPON MAKAN</strong></td></tr>
      <tr><td colspan='2' class='text-center' style='text-decoration: underline;'><strong>juni, 2015</strong></td></tr>
      <tr>
      <td class='text-left'><h2 style='margin-top: 0px; margin-bottom: 0px; color: #0060f1'>12</h2></td>
      <td class='text-right'><h3 style='margin-top: 0px; margin-bottom: 0px; color: #144691'>212</h3></td>
      </tr>
      <tr><td colspan='2' style='font-size: 13px; font-style: italic'>1. Kupon ini hanya berlaku sesuai bulan & tanggal</td></tr>
      <tr><td colspan='2' style='font-size: 13px; font-style: italic'>2. Tidak dapat diuangkan</td></tr>
      </table>
      </div>
      <?php
      }
      ?>
      </div>
      <?php
      }
      ?>
      </div> <!-- /container -->
      </body>
      </html>";

Can anybody tell me where is my mistakes. Regards.




Django TextField always is required, despite blank=True,Null=True

I am having trouble with a field that seems to always want to be required despite my best wishes. My 'word_search' text field is always requesting data to be input but I have been trying to make sure the options allow for a blank.

my model is this. You can see the blank=True,Null=True options

class IAV(models.Model):

  z_score = models.DecimalField(max_digits = 4,decimal_places=4)
  screens = models.IntegerField(default=0)
  flu_proteins = models.IntegerField(default = 0)
  word_search = models.TextField(blank=True,null=True)
  sess = models.ForeignKey(Sess_IAV,default=None)

my view is this

def new_IAV(request):

  if request.method == "POST":
    form = IAVForm(request.POST,request.FILES)
    if form.is_valid():
      sess_ = Sess_IAV.objects.create()
      form.save(
          for_page=sess_,
          z_score = form.cleaned_data("z_score"),
          screens = form.cleaned_data("screens"),
          flu_proteins = form.cleaned_data("flu_proteins"),
          word_search = form.cleaned_data("word_search"),
          )
      return redirect(sess_)
    else:
      print(form.errors)
  else:
    url=reverse('IAV_home')
    return HttpResponseRedirect(url)

My form is this. you can see the required=False attribute.

class IAVForm(forms.models.ModelForm):

  z_score = forms.DecimalField(widget=forms.NumberInput(attrs={'class':'form-control','value':'0.0',}))

  screens = forms.IntegerField(widget=forms.NumberInput(attrs={'class':'form-control','value':'0',}))

  flu_proteins = forms.IntegerField(widget=forms.NumberInput(attrs={'class':'form-control','value':'0',}))

  key_word = forms.CharField(widget=forms.Textarea(attrs={'class':'form-control','rows':1,'cols':10,'placeholder':'keword values','required':'False'}))


  class Meta:
    model=IAV
    fields=('z_score','screens','flu_proteins','key_word')

  def save(self,for_page,z_score,screens,flu_proteins,key_word):
    self.instance.sess = for_page
    self.instance.z_score = z_score
    self.instance.screens = screens
    self.instance.flu_proteins = flu_proteins
    self.instance.key_word = key_word
    return super().save()

I am not sure how this field is not allowed to be left blank considering the model has the 'blank=True, null=True' options present.

Also the widget says that it isn't reqired.




Web Design - What is that style?

I was wondering if there was a name for this 'style' of web design (sorry, these are the only examples I could come up with atm):

http://ift.tt/1wcwgl8

http://ift.tt/o1Z0X6

I see it used frequently and want to try to do something similar as an excercise.

The style is very vertical and has a feel of 'defined' sections as you scroll vertically... I don't know how else to explain it, hopefully the pages are proper examples.




Google Web Stater Kit to Server

I am using the Google web starter kit to build myself a portfolio. I have everything up and running locally using gulp etc. I just want to know how I prepare my app to allow it to be placed on a web server? What are the processes to do so?




How to dynamically generate images in a web application

I am trying to develop a web application which sells customized toy cars like hot wheels. I want to give user option to customize their own car. For example the user can select the color, wheel, body type and every time a user selects something it should dynamically generate image for that so that the user can see how the car looks like. I also want to give option to user for uploading cars they have and modifying their colors and see how the car would look like. How should i approach this and what technology/language is useful for this ?




Azure web job How to edit its schedule

I have made a Azure web job which invoke power shell, how can I edit it once it is built? By edit I would mean
1.Change the ps script that have i uploaded as a zip file. 2 Change the schedule of the web job Thanks in anticipation

Ajay




How to understand that SOAP webservice use HTTP only for transport?

As I understand RESTful webservices use whole power of http, suffice to say all that rest need is http, but in the same time rest!=http. CRUD provides ability to do any action with API resourses, for example we send http request, this request has header for aunthefication, name of method (for example put), and json in body for updating. How this proces is running via SOAP? SOAP uses XML, but how this XML is delivered to API?




Image rendered differently in firefox than in chrome

First, please tell me if this belongs in another community, but since the problem happens in a browser I felt more appropriate to post here than in graphic design.

I bought a theme to make a quick website, but wanted the provided background-image to be a bit lighter. Armed with gimp and limited knowledge, I fiddled with the brightness/contrast and came to a satisfying result. I saved the file with a simple ctrl-S (didn't change the filetype or anything).

In chrome the result is as expected. In firefox, somehow the contrast seems way up and the image looks much more purple?

Here is a screenshot of the problem, left is in gimp, middle is in firefox, right is in chrome.

Screenshot of my problem

Here is the file, not in a screenshot:

original file

I am very curious as to why this is happening, and how to fix it it, because the result in firefox in far inferior than in chrome!

Thanks in advance to anybody who can help!




Distributed Web crawling using Apache spark

It's an interesting question asked me when I attended one interview about Apache spark,as a part of web mining. The question was, is it possible to crawl the Websites using Apache spark?. Then I was confused. I answered possible, just guess. Then next question how? It's because it supports distributed processing capacity of spark. After the interview I had searched it, but couldn't find any interesting answer. Is that possible with spark any help?




Export a site structure from IBM Web Content Integrator

Does anybody know if it's possible to export a website structure from IBM Web Content Integrator? Possibly in some sort of hierarchy with the urls under each level?




How do I lock the orientation to portrait mode in a Mobile Web Application?

I am making a web application using html, and javascript for mobile devices (phones). How can I lock the screen orientation in portrait? Are there any extensions, or frameworks to do this?




ASP.NET saving text to database in correct format

I have an ASP.net 4.5 text box with 5 rows. When I save the below data to my table it does not take in consideration that there are line breaks.

Example:

Hello my name is Mike! How are you?

Please can you help?

When saving this data to my table it of course save it like this below and it will be displayed like this again if I populate my website with this value.

Hello my name is Mike!How are you?Please can you help?

But I want it to be displayed with the line breaks as the way it was written in the first place.

The thing is, I do not want to make use of a custom form item because then the user will be able to copy and paste all html from another website in and I do not want that.

Any idea how this can be done without using a plugin such as below where the user will be able to copy and paste data into?

enter image description here




How to handel session in Ajax and Servlet

I am developing a website using Java/Servlet and Ajax, with some libraries of D3.js The problem when I access the website from different PC or phones, I submitted the data successfully using the HTML form and it gives me the results as I want, BUT the problem when I use the form to submit new data using the same machine (Iphone or PC), the showing results still for the old query, when I check the server I see the new files created for the new query but in my phone or PC the results still showing the old query data.

Any help or ideas.

// form submit and validation
$("input,textarea").jqBootstrapValidation({
        preventSubmit: true,
        submitError: function($form, event, errors) {
            // additional error messages or events
        },
        submitSuccess: function($form, event) {
            event.preventDefault(); // prevent default submit behaviour
            // get values from FORM
            var vendor = $("input#vendor").val();
            var product = $("input#product").val();
            var version = $("input#version").val();

        var checkbox_value = "";
            $(":checkbox").each(function () {
                var ischecked = $(this).is(":checked");
                if (ischecked) {
                    checkbox_value += $(this).val();
                }
             });

        $.ajax({
                url: "servletname",
                type: "GET",
                data: {
                    vendor: vendor,
                    product: product,
                    version: version,
                    dependency: checkbox_value
                },
                cache: false,
                success: function(responseText) {
                      .... 
                }




Good tutorial on OC4J Java Web Services

Hi I'm new at developing web services but I would like to know if anyone knows a good place to find an end-to-end tutorial on how to develop, deploy, and test a Java based Web-Service onto an OC4J environment using jdeveloper 10.

Thank you




Woocommerce & Inventory Management.

I have four woocommerce sites with different currencies, how would I be able to have them connected to one inventory platform? What do I use? There are different products and different currencies. Some USD and some CAD




django website development handling millions of requests

I am developing a website using django which should handle millions of requests and with lot of dynamic content. I would like to know which server,caching technology,load balancers can be used for it.thank you.




how can I add Facebook friends recent to the listbox?

http://ift.tt/g8FRpY [your id] /friends_recent how can I add Facebook friends recent to the listbox?

Vb.net code?




I need catch just windows close event [duplicate]

This question already has an answer here:

I need a javascript event that I can run a fuction when the user close the browser. I try to use "onBeforeUnload" but if I use jquey.onload (ajax) or refresh the page, javascript catch the event too. I only need run the funtion when the user close the browser. There are any form to do it??




Know about Android Standard Browser page url change events

I want to know the is there any event into Android which fires on "Android standard browser/Default browser" URL change ?(Not on WebView from my application).

When I load some site into Default browser say : example.com and after that I navigate to the other page(done by User interactions e.g. click etc) like : example.com/page1 Then is there any event fires ? So that I can use that event to do my task.

My solution : (I have not tried this)

  • Start background service to watch for default browser is opened?
  • If the user enters any url, save this to app memory(may be shared preferences).
  • After some time interval again check the url and compare with the previous saved url
  • If it does not matches call my method to do task. And update current url into app memory

Instead of doing this is their any events / broadcasts are provided ?




how url entered at facebook comment or post converts to picture view?

When I enter url in facebook comment or post. it changes to image displaying title and image in the page. how it is done? All i need to know is , what facebook do convert ?




I can't connect to my SQL Server database Using VB.NET

Protected Sub login_btn_Click(sender As Object, e As EventArgs) Handles login_btn.Click

    Dim connString As String
    Dim connection As SqlConnection
    Dim command As SqlCommand
    Dim sql As String
    connString = "Data Source=.\SQLExpress;Initial Catalog=Suivi_Invst;Integrated Security=True"
    sql = "select NET_ID, Password from User"
    connection = New SqlConnection(connString)

    Try
        connection.Open()
        command = New SqlCommand(sql, connection)
        Dim sqlReader As SqlDataReader = command.ExecuteReader()
        While sqlReader.Read()
            If (Password.Text = sqlReader("Password") And NET_ID.Text = sqlReader("NET_ID")) Then
                Response.Redirect("Creation.aspx")
            End If
        End While

        sqlReader.Close()
        command.Dispose()
        connection.Close()
    Catch ex As Exception
        MsgBox("Can not open connection ! ")
    End Try

End Sub

I always get the msg box saying that connection can noy be established.

I tried to open SQL Server Management Studio at the same time the code running but I didn't anything.




Building fast webservices with rethinkdb as backend

I would like an informed opinion on which application to be used to build a small html page with rethinkdb as the backend. I am currently leaning towards node.js. Or is there anything easier to use even if options are missnig?. Basically I want to implement a html page that displays contents of an entire table. I am a total newbie. Please advice. Thanks




where I can find an information about develop web document collecter?

I'm a student majoring in computer engineering lived in Korea. I wonder that how many the articles have no worth to read made in everyday. I want to collect the articles and analyze, and identify the worthless.

So, I wonder that where I can find the contents about how to make web document collecter? blogs, books, or codes, I want some information about that.

I guess it has some grammos, so I really appreciate reading my question. Have a nice day :-)




mardi 28 avril 2015

I want to create a website for polls/survey like this http://ift.tt/1l79jYH

but did not understand 1)the concept of generating a link & 2) more importantly how they save the data in database,do they save it like id of poll & yes/no click or done with other logic. 3)what will happen to the polls which are expired?will they remain in database or somewhere else? please help




how to create mobile web aplication in codeigniter framework?

I want to create a mobile application website (m.example.com). before I make the web using CodeIgniter framework (CI). like where a great solution to add m.example.com in Framwork CodeIgniter ??

thanks for the response has been simply and solutions




Refreshing page with a new image

I currently have a stagnant image on my site:

body {
background-image: url("../images/1.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-color: black;

border-bottom: 8px solid  #7D8A28;

}

It's just that I want it to be a different image each time the page refreshes, so it auto changes to 2.jpg, 3.jpg, 10.jpg, whatever. (There are hundreds to choose from)

Could someone help me out with a solution? I'm not very good at this, and this is my first site.

Thanks.




HttpWebRequest Authentication not working

Alright, so I'm writing a program to access a RESTful service, but I first must provide authentication to the website. I have valid credentials and my entire code looks like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Net;
using System.IO;

namespace AccessAPI
{
    class Program
    {
        static void Main(string[] args)
        {
            string uri = "http://domainName/";
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
            string auth = CreateAuthorization("http://domainName/", "my\\username", "password");
            request.Headers["Authorization"] = "Basic " + auth;
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            StreamReader reader = new StreamReader(response.GetResponseStream());
            Console.WriteLine(reader.ReadToEnd());
        }

        static string CreateAuthorization(string realm, string userName, string password)
        {
            string auth = ((realm != null) && (realm.Length > 0) ?
        realm + @"\" : "") + userName + ":" + password;
            auth = Convert.ToBase64String(Encoding.Default.GetBytes(auth));
            return auth;
        }
    }
}

I've come this far using a few of the solutions posted on other forums. While this seemed to work out for some people, it doesn't for me. First off, I do KNOW that the credentials are accurate. I'm able to enter them over a web browser and they behave just as they should. Also, I made sure that any "\" in them (there is one in the username) is represented with a "\\" in the code. Every time I run this, though, I keep on getting back "The remote server returned an error: (401) Unauthorized." Can anyone help me troubleshoot through this? Thank you for your time!




Add bold text in mail sender text

Here is the code:

$email_body = "You have received a new message. ".
    " Here are the details:\n\n Name: $name \n Email: $email_address \n Message \n $message";

I want to add bold text to: "Name:", "Email:", and "Message"

I have tried using the "< b > name: < /b>" (without space of course), but it doesn´t work. I want the text to be bold when i receive the mail.




Error while trying to get data using NHtmlUnit

I'm trying to get data that is loaded dynamically from an url. (After disabling javascript and refreshing in chrom data is no more loaded).

I tried HtmlAgilityPack but I think it is not possible so I turned to NHtmlUnit.

I'm using this code:

    public void CollectData()
    {
        string urlAddress = "http://ift.tt/1JPDe2Q";
        var client = new WebClient();
        var currentPage = (HtmlPage) client.GetPage(urlAddress);
        client.WaitForBackgroundJavaScript(10000);
        var streamWriter = new StreamWriter(@"Documents");

        for (int i = 0; i < 2; i++)
        {
            HtmlTable table = (HtmlTable) currentPage.GetByXPath("//table[@class=' table-main']")[i];
            foreach (var row in table.Rows)
            {
                foreach (var cell in row.Cells)
                {
                    streamWriter.WriteLine(cell.AsText());
                }
                streamWriter.WriteLine();
            }
            streamWriter.Close();
            client.CloseAllWindows();
        }

    }

It seems that still the used xpath give no results ... I have no idea how to fix it ..

Thanks for your help.




PHP echos "?>" into every page [duplicate]

This question already has an answer here:

I tried to search this problem but all search engines seemed to ignore the "?>" aspect of the search.

I've been working on a website thats written in PHP for someone and recently they updated their webserver and every page that includes PHP will print "?>" on the page, PHP will still be executed. On my own local server, I don't see the "?>" tag pop up.

How would I go about getting rid of the tag that shows up on their webserver (it's Apache, hosted through myhosting.com's OnCloud server).

Thanks in advance.

Edit: This problem is not a duplicate of the one linked. The PHP still works just fine. For some reason, "?>" is being appended to certain pages, but not all.




What do i need to learn to create this site? (details in post)

I want to make a website which can take user input, store the input and a few pieces of related data to the input, and then create a new web page where the user can see the data they entered displayed. The new web page doesn't go away when the user closes the page, I need the page to be a new page that anybody can access.

I have experience with HTML, CSS, and Javascript. What other languages do I need to learn in order to make this happen?




Web Audio load both .mp3 and .ogg

I'm building a canvas game using javascript and web audio. To get it to work in Firefox I have a copy of all the audio files in .ogg format. The code to load these files is below. To get the desired audio file I use ' playSound(samplebb[3], channel1); ', I have done it like this as in my app it is useful to choose the sample based on number, for example sounds can be chosen using probability and randomness.

I read on a forum "the loader will accept both [mp3 and ogg] for the same sound, just pass both paths in an array rather than a single string." The 4th line of code is me trying this but it does not work.

Is it possible to load an alternate ogg file for each mp3 like this? (In one bufferlist) Or will I have to detect the browser and build a bufferlist of oggs if the browser is Firefox?

Thanks

function loadSounds() {
bufferLoader = new BufferLoader(audioContext,
    [
        ['sounds/1-KICK.mp3', 'sounds/1-KICK.ogg'],      //0  // Not found
        'sounds/2-BASS.mp3',      //1
        'sounds/3-BASS2.mp3',     //2
        'sounds/4-BASS4.mp3'      //3
        // ...  ...   ...
    ],
    finishedLoading
);
bufferLoader.load();
}


function finishedLoading(bufferList) {
for (var i = 0, l = bufferList.length; i < l; i += 1) {
    var source = audioContext.createBufferSource();
    source.buffer = bufferList[i];
    source.connect(audioContext.destination);
    var note = {
        note: source,
        ready: true
    };
    samplebb.push(note);
}
setTimeout(play, 1000);
}




Responsive Web Page with CSS stripped out, tags

I create web pages that are uploaded to client's web site that is hosted via a third party. The sites will strip out any CSS code. Basically, I can only upload body tags for the pages. Is it possible to create a responsive web page without CSS, or would inline CSS code work? Could similar code used in email blasts work? Trying to find a workaround. Thanks.




Are anti-forgery tokens necessary on a login page?

I keep seeing code samples which place anti-forgery tokens on standard username/password login pages. Even the Asp.Net web project template does it.

Why? The only system state that is changed is the user's login status, and in order to even make that happen the attacker would need their username and password which would mean everything is already maximally compromised.

I just don't see the attack vector here. Am I missing something?




How do you display XML code in HTML [duplicate]

This question already has an answer here:

What I'm trying to figure out is how to display XML snippets on a webpage using HTML. However the things I've tried have resulted in my XML tags to disappear but the text remains.

<pre> <code class="codeblock"><![CDATA[
   <dependency>
     <groupId>com.foo.bar</groupId>
     <artifactId>bar</artifactId>
     <version>LATEST</version>
   </dependency>
]]></code></pre>

The above results in the below to be displayed

com.foo.bar
bar
LATEST

the desired output would be

<dependency>
  <groupId>com.foo.bar</groupId>
  <artifactId>bar</artifactId>
  <version>LATEST</version>
</dependency>




Control flash movie from Java

I have to control a web site from my java program, this site http://ift.tt/1OicHSi is made with flash movie, do you know to make it?

Thanks.




Javascript value not updated with the value returned by the FB api

Excuse my lack of knowledge when it comes to javascript. The issue I'm showing it might be trivial, but I can't figure it out.

I have the following piece of code:

function ShowMyName() {
        var imgSrc="test pic";
        //set that image as default so I have a back-up for the demo
        FB.api(
            "/me/picture",
            {
                "redirect": false,
            },
            function (response) {
                /* handle the result */
                console.dir(response);
                imgSrc=response.data.url;
                console.log("FB pic is "+imgSrc);
             }
        );

        console.log(imgSrc);
}

My neanderthalian brain thought that the new value for imgSrc will be the one returned by the FB api. Clearly that's not what happens. It's the same old value as before "test pic".

How can I set the value of imgSrc to whatever I get back from facebook?




Filter disposable email addresses without violating privacy policy

Seems to be not programming question, but sooner or later every (web) developer will face it, so I strongly believe it fits to stackoverflow, because zillions of developers must find a usable answer to this, and also should solve the existing solutions privacy related issues.

I find many service and API in the web what offers validate an email address against its (internal) disposable email domain list. I think using this method is a very bad idea. Practically all today's web sites ensure its users it have very trustable privacy policy, and never, never exposes the users email to a 3rd party. Now using this emerging "disposable email validation services" what is your first thing: expose your users email to a 3rd party. It maybe just the domain name, but still, it is definitely hurts privacy, and surely against your sites privacy policy.

I understand if one has an up to date list of a disposable email domains that's a value which one do not want to expose, but still the community have free and updated lists for similar situations.

I've found some public list, but neither seems to be updated (see links below)

Do anyone know a publicly available list, which is updated regularly?

http://ift.tt/1Iio8Vj

http://ift.tt/1dVvZ7H

http://ift.tt/1Iio6wy




Internationalization (i18n) / Localization for Node.js web application

I have a web application build using Node.js. I wish to do internationalization and support english and Spanish language.

Whenever the user selects the english link the static content of my 'index.ejs' page should be in english and when he selects Spanish it should change accordingly.

How can I do that? What would be the simplest way to do that? Also, How can I improve Search Engine Optimization (SEO)?




Using webs without API's

I need to use some web services for automate some tasks. Those webs don't offer any kind of API to talk to, but they have some forms, some of them use login (sessions and the like).

Im trying to access them by surfing the forms with firebug on so I can read what they are doing inside and then sending curl commands and parsing the answers but it's getting really hard.

Am I doing it right? There is other tools I can use? Do you know any tutorial or some indepth resource I can read / study to learn how to do this better (I dont mind if its a book / spending months studying)

THanks for your time

EDIT: I forgot to mention, the regular html are no problem with javascript + php are a bit harder but I manage to get them working. My main problems lay when they use ".cgi" ajax or when they use authentification (i have the credentials to log in but i struggle to send them and pass the cookie/session to the next request).




List of specific language and/or specific country websites

I want to resolve all websites which are hosted inside an specific country and/or using an specific language. The more abstract question is I want to resolve all the websites which have almost all internet users of that country.




lundi 27 avril 2015

Javascript / HTML - how to interleave interaction and text?

I'm new to javascript / web programming although I've done a plenty of non-web programming.

I'd like to make a page with interleaved text and interactive visualization, along the lines of Bret Victor's essay - http://ift.tt/13ZbaZW

Can anyone recommend approaches/code examples to achieve this kind of interleaved layout using html/css/javascript?




Cordova project in netbeans cannot display library js in the table

I tried to create a new Cordova project in netbeans and when the step comes where i have to select the required js from the table I tried to add the new two js. But the it showed some network error and asked me to configure the proxy. But then i updated the entire lib and now the table does not show any lib files instead show it to be loading. Please help.




Parallax scrolling on slider jquery

I can't find it anywhere. i'm trying to use a full screen slider and has parallax scroll effect when i scroll down in website, but all parallax effects are applying on images not whole div or slider.




HTTP Error 500.19 - Internal Server Error Cannot read configuration file

I have been searching for this error all over the internet but no matter what I try to fix this problem nothing actually works. And the detailed message that I got after I copied a url from fiddler and put it in the browser and is as follows.

Module IIS Web Core

Notification BeginRequest

Handler Not yet determined

Error Code 0x80070003

Config Error Cannot read configuration file

Config File \?\C:\inetpub\wwwroot\myservices\web.config

Actually what has happened in the past that I had this service called "myservices" working all fine when I used visual studio to create a virtual directory for it in IIS. But then what I did, I tried to do a web deploy of this service in IIS and removed ("myservices" from Default Web Site tree which I had created by creating a virtual directory from within VS 2013). And what I observed is, that after I web deployed "myservices" it didn't work the same way as it was working previously when (I created a virtual directory for "myservices" in IIS through VS2013 but had it removed to see whether the web deployed version of it would behave the same way). Therefore when I analyzed the cause of HTTP error 500.19 through Fiddler (for the web deployed service) it said (Config Error Cannot read configuration file and Config File \?\C:\inetpub\wwwroot\myservices\web.config) but when I physically try to look into the folder C:\inetpub\wwwroot I could never find myservices folder as such (what to talk of web.config file in it). Then I manually created a folder called "myservices" in C:\intepub\wwwroot directory and put my web.config file there to see if the web deployed service would still work, but it didn't. Then I removed this folder called "myservices" and obviously the web.config file inside of it and also removed the web deployed service from Default Web Site Tree.

And now after all this mess even if I go to visual studio and try to create a virtual directory for my service "myservices" (I can see it in Default Web Site Tree in IIS ) but it would throw the same error as http 500.19 as the web deployed version of this service. In other words whatever I tried it messed up my services even when it's not a web deployed version which previously was not the case. I literally request everybody out there to please guide/suggest me with whatever experience they have as to what went wrong in all this trial and error endeavor of mine.

Thanks




ressource for moving objects animation web

I am asked to build a website with an animal moving, making faces and this kind of stuff. I am pretty good with jquery but I cant find any tuts for this kind of thing.

So my question is how to do this project and with which technology ?

If you happen to have a tutorial, example or anything that may help its all very good for me.

Thanks




ngrok tunnel is not keeping theme / style of wordpress site hosted in IIS

I have created a wordpress site and am hosting it in IIS. I want to demo this site without deploying it, and I have installed ngrok for this purpose.

When I view the site on my local host, everything looks fine. However, when I view the site remotely through the ngrok tunnel, the content appears, but all style & theme elements are lost.

I apologize, I am new at this and I don't know what code / configuration / documentation would be helpful for solving this problem.

Any idea why this may be occurring? Thanks a million for any help or suggestions.

Ben




Web Matrix insert command "System.FormatException: 0 : - Input string was not in a correct format"

I am having a problem inserting to DB when I use more than 2 variables.

var answer1 = Request["result1"];
var answer2 = Request["result2"];
var answer3 = Request["result3"];
var answer4 = Request["result4"];
var answer5 = Request["result5"];
var answer6 = Request["result6"];
var answer7 = Request["result7"];
var answer8 = Request["result8"];
var answer9 = Request["result9"];
var answer10 = Request["result10"];
var answer11 = Request["result11"];
var answer12 = Request["result12"];
var answer13 = Request["result13"];
var answer14 = Request["result14"];
var answer15 = Request["result15"];
var answer16 = Request["result16"];

string disabled = "";

if(IsPost && Validation.IsValid()){
   if( Request.Form["submitbutton1"] != null) {
            var insertCommand = "INSERT INTO Answers(Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q16) VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15)";
            db.Execute(insertCommand, answer1, answer2, answer3, answer4, answer5, answer6, answer7, answer8, answer9, answer10, answer11, answer12, answer13, answer14, answer15, answer16); 

Any reason I cannot add all these variables? All datatypes are correct, i.e. int or nvarchar for each variable. Please help! I can provide more info if needed.




Web Android virtual machine of emulator?

I develop Android app's with a group of several professionals, often they come to my desk so I would install the latest compile version on their devices. I was wondering if there is any tool like a web Dalvik (Android Virtual Machine) to show my app, maybe some Android web emulator.

Regards Jose




Microsoft Expression Web X VS Express 2013 for Web X Visual Web Developer Express X Visual Studio Community 2013 X WebMatrix

I'm looking for a Microsoft WYSIWYG CSS Editor. I see Microsoft has several tools with similar names. I'm so confused. I'd like to know the difference between the 5 of them.

  • Microsoft Expression Web 4
  • Visual Studio Express 2013 for Web
  • Visual Web Developer Express
  • Visual Studio Community 2013
  • WebMatrix

What's the most complete tool?

Thanks.




Unable to access Webservice using axis

I have the .Net webservice. which I am able to connect using simple request response string. It requires authentication by using Authenticator I am able to connect

 Authenticator.setDefault(new Authenticator() {
                    @Override
                    public PasswordAuthentication getPasswordAuthentication() {
                        return new PasswordAuthentication("domain" + "\\" + userName, password.toCharArray());
                    }
                });

With this I am able to connect my webservice.

However when I generate the wsdl classes using axis. And when I call webservice i am getting authentication error. Please let me know how can i embede Authenticator.setdefault in axis webserive call

I tried setting _call.setUsername and _call.setPassword But still I am getting authorization error. because it is not having username/pass




ASP.net Validation Control Interfering With Separate Controls

I have a FormView on a page which allows a user to update an entry in the database. The database is defined using a code first approach, several fields are defined as being required. The form view is shown below, the form view works:

<asp:FormView ID="BikeAdd" runat="server"
        ItemType="WLL.DAL.Bike"
        InsertMethod="BikeAdd_InsertItem"
        DefaultMode="Insert"
        RenderOuterTable="false"
        OnItemInserted="BikeAdd_ItemInserted"
        ValidationGroup="BikeForm"
        >
        <InsertItemTemplate>
            <fieldset>
                <div>
                    <asp:DynamicEntity runat="server" Mode="Insert" />
                </div>
                <br />
                <asp:Button ID="ButtonBikeAdd" runat="server" Text="Insert" CommandName="Insert" />
            </fieldset>
        </InsertItemTemplate>
    </asp:FormView>

On the same page I also have a FileUpload control. Which is shown below:

<asp:FileUpload ID="BikeImgUpload" runat="server" />
<asp:Button runat="server" ID="UploadBtn" Text="Upload Image" OnClick="UploadBtn_Click" />

The problem is that, when I attempt to upload a file, by clicking the 'UploadBtn' nothing happens other than the required field validation control being populated; a '*' is displayed beside required fields. The code behind the upload button is shown below:

protected void UploadBtn_Click(object sender, EventArgs e)
    {
        if (BikeImgUpload.HasFile)
        {
            try
            {
                string location = Path.GetFileName(BikeImgUpload.FileName);
                BikeImgUpload.SaveAs(Server.MapPath("~/Images/BikeImages") + location);
                Status.Visible = true;
            }
            catch (Exception ex)
            {
                Status.Text = "Error:" + ex.Message;
                Status.Visible = true;
            }

        }
    }

If anyone has any input on the issue that would be great.




Django: How to automatically change a field's value at the time mentioned in the same object?

I am working on a django project for racing event in which a table in the database has three fields.

1)Boolean field to know whether race is active or not

2)Race start time

3)Race end time

While creating an object of it,the start_time and end_time are specified. How to change the value of boolean field to True when the race starts and
to False when it ends? How to schedule these activities?




bootstrap model showing me firs row data every time ...

bootstrap model showing me same data in while loop . when i click any model it shows me first row data , how to fix this plz help me .. Here is code// $sql="SELECT * FROM tbl_store order by store_id DESC"; $result=mysqli_query($con, $sql); while($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) { #code here }

Edit × Edit Store

                            <form role="form" action="editStore.php" method="POST" enctype="multipart/form-data">
                            <!-- text input -->
                            <div class="row">

                              <div class="col-md-3 col-xs-3" style="text-align:right; color:#000000;">
                                <h6>Store Name :</h6>
                                <br>
                                <h6 style="margin-bottom:40px; margin-top:-10px;">Description:</h6> 
                                <br>
                                <h6>Phone:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Address:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Latitude:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Longitude:</h6>
                                <br>
                                <h6 style="margin-top:0px;">City:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Country:</h6>
                                <br>
                                <h6 style="margin-top:0px;">Upload photo:</h6>
                                <p style="color:red;">*If you want to replace</p>
                              </div>
                              <div class="col-md-9 col-xs-9" style="text-align:left; color:#000000;">
                               <input type="text" class="input form-control" style="width:100%; margin-bottom:10px;" name="title" value="<?php echo $row['store_title']; ?>" required/> 
                              <br>
                              <textarea class="input input-group" rows="3" style="width:100%; margin-bottom:10px; padding-left:10px;" name="description" required><?php echo $row['store_description']; ?></textarea>
                              <br>

                              <input type="tel" class="form-control" style="width:100%; margin-bottom:10px;" name="phone" value="<?php echo $row['store_phone']; ?>"/>
                              <br>
                              <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="address" value="<?php echo $row['store_address']; ?>" required/>
                              <br>
                              <div class="row">
                                <div class="col-md-6 col-sm-12 pull-left">
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" max="180" min="0" step="0.00001" name="lat" value="<?php echo $row['store_lat']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" max="180" min="0" step="0.00001" name="long" value="<?php echo $row['store_long']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="city" value="<?php echo $row['store_city']; ?>" required/>
                                  <input type="text" class="form-control" style="width:100%; margin-bottom:10px;" name="country" value="<?php echo $row['store_country']; ?>" required/>
                                </div>
                                <div class="col-md-6 col-sm-12 pull-right">
                                  <img src="<?php echo $row['store_image'];?>" style="float:right;max-height:200px;max-width:200px;">
                                </div>
                                <input type="file"  style="margin-left:15px; width:93%;" name="photo"/>
                                <input type="hidden" name="store_id" value="<?php echo $row['store_id'];?>">
                              </div> 

                             </div>
                            </div>

                          </div> 
                          <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                            <button type="submit" class="btn btn-primary" name="submit">Save changes</button>
                          </div>
                          </form>
                        </div>
                      </div>
                    </div>




Audio.js, how to add support for formats and stream types

i'm making radio database and i'm using audio.js to play m3u streams. How i add support for acc,ogg,wma,mms streams and shoutcast stream type?

Thanks for answers:)




Client - Server model using Dart as Client and Go language as Server

I am trying to understand google two programing language.

Dart --> Produce Javascript

Go --> Produce machine code

If I need to combine Client - Server model. I am wondering how the architecture works.

How does it work. Is there any example/sample.

Example : Please explain this.....

I type www.learnlang.com. I expect WEB UI is served using Dart and It is calling REST API developed in GO language.

Note : Please don't relate google app engine. I am trying to understand the model in individual servers.

Thank you.




HTML Audio element with mediastream as source manipulate stereo

I'm using webRTC(voip) to feed a Mediastream to an audio element on my webpage.

The users of the voip on the website should be able to have some sort of 3D Audio, they can place other users around them and maybe have one user on their right and another one on their left.

Every User you hear is one audio element on the page, in order to simulate 3d audio I have to control how loud one audioelement is on each side of the headphones. Is there a way to achieve this, control an audioelements volume on each side? I already looked in the Web Audio API and its panning functions but I couldn't get it to work with the Mediastream and the audio element.

//stream is the MediaStream
audio.src = URL.createObjectURL(stream);

audio.play();

Hope someone can help me, best regards.




What's the best way to make an Assembly compiler in Python available online?

The compiler works by receiving a file that contains the macro assembler source code then, it generates two files, one is the list and the other one is the hex file.

Everything works alright while offline but I want to make it online.

In this case, the user will provide an MC68HC11 assembly source code file to my server (I already have the server up and running) and after this, my server will compile it using the Python script I wrote and then it will give the user an option to download the list and the hex file.




How do i improve this web design?

This is my website in progress for my startup company

I would appreciate if you guys could give me your honest comment and feedback about the overall presentation and whether you understood what service i am providing.

I am contemplating whether to take out the carousel/slider and replace it with a large Hero image of a human courier deliveryman instead to better deliver my message

Thanks!

http://ift.tt/1DtbrQB




How can you embed a document (such as pdf) into a website and allow users to click and drag and zoom?

I am creating a mobile site that needs pdfs of maps embedded. Do to a mobile devices small size I'd like to have users be able to zoom and drag the map around and only see a portion of it at a time. Is this possible?

If not I'm not totally against creating the maps in another format that could be used.

Any ideas?




When is Python preferred over PHP?

I'm used to PHP applications, as I don't know the Python language. However, I've noticed Python is very popular and sometimes preferred over PHP(?). I'm thinking about learning the Python language, as I'm not sure if it's enough to know just PHP for web applications.

Why should I learn Python? In what situations are Python preferred over PHP? Are there things Python can do that PHP can't?




Web application send sms from my mobile phone?

I am from Romania and I am developing PHP Application for 1 year. I want to build now a web application that sends sms from web using my phone number. When the sms is send from the web, my sim card will be activated and will send that sms from my phone. Can you tell me please where to start with this? Thank you!




How to make a webhosting site with drupal?

I am going to make a web site for a web-hosting company. I am wondering what modules to use for the sells part, so that I can replicate WHMCS functionalities, including selecting packages, checking available domains, recurring bills, etc.?

I am thinking of using ubercart module as the basis for the e-shop and domain finder for check available domain.

Thanks




Error while submitting php form with aws database

<?php

define ('DB_NAME', '');
define ('DB_USER', '');
define ('DB_PASSWORD', '');
define ('DB_HOST', '');

$connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if (!$connect) {
die('Could not connect: ' . mysql_error());
}

$dv_selected = mysql_select_db(DB_NAME, $connect);

if (!$db_selected) {
die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}

$sql = "INSERT INTO client (Name, Email, Question) VALUES ('$_POST['Name']',                  '$_POST['Email']', '$_POST['Question']')";

if (!mysql_query($sql)) {
die('Error: ' . mysql_error());
}

echo 'Connected successfully';

mysql_close();
?>

This is my php file but each time I try to send inofrmation to the database using this link!

"The specified method is not allowed against this resource."

If you try this out you will see I get an error when trying to post..




Which is the best distro of linux for web development?

Can anyone give me any suggestion for the best distro of linux for Web development.




What kind of technology is behind this?

I'm working on a custom tees shop for a school proyect and I'm kind of lost when it comes to adding this module to my website. Basically I have a blank t-shirt and a button to upload an image. I want that image to overlap my blank t-shirt.

I'm using html5, php and javascript.

I've found several sites that do this and much more like http://ift.tt/XoN4Et

Any help is appreciated!




VBA Webscraping, taking data from a script tag

I have been building a scraper, I've managed to scrape most of my needed info into an excel sheet, one piece of info has been causing me problems because it's in a piece of HTML I am unfamiliar with scraping.

<script type="text/javascript">
    var mapOptions = {
        property: {
            PropertyID: 1234567,
            Address: "Address, Address, Address",
            Price: "€100,000",
            Map: {"Latitude":00.0000000,"Longitude":00.0000000,"Accuracy":2,"IsAutoGeocoded":true,"Polygons":[]},
            MainPhotoUrl: "//photo.jpg",
            PropertySection: 1
        },
        propertySection: "residential",
        baseUrl: "",
        useOpenLayer: false,
        zoom: 15
    };
</script>

I am trying to scrape out the latitude and longitude from this script, any idea how?




Advantage and Disadvantage of flex compare to other

I search but didn't get any duplicate question like here. So, i ask it.

I am going to develop one Web application, Desktop application and Mobile application. I am going to develop this application in Adobe flex.

But, my question is what is the advantage and disadvantage of developing application in Adobe flex and other platform.
May i go through Adobe flex or another? If in other than why?
What things i have to remember before developing the application?

Any help is appreciated.
Thanks.




How can i use Wordpress functions in my php files in theme folder?

When i used wordpress functions like a wp_nav_menu in index.php file in theme folder - it works, but when in try to use it in other files in this folder - i received error: "Call to undefined function". Help me please




dimanche 26 avril 2015

Ip hider software

I want to scrap some data from a website but after some time it prohibits the access of this site. I have used "hotspot Shield" to hide my ip. But "hotspot Shield" uses a virtual ip for example they use a ip via a country like Japan. But after some time the website also restricts the access of that website. Is there any free ip hider software which hide ip dynamically for example for a while it will use a ip via "Japan" then it will use a ip via "USA" that means automatically it will change the country???




Generate a complete URL within a Yesod application

I mean that for example

YC.getUrlRender >>= enact where
    enact renderURL = renderURL HomeR

will result in "/", for example, and usually that's what you need. However, I'm trying to crack email verification where the email has to contain the http://ift.tt/1HM6vhv bit as well so that the user can click on the link to verify the new account. Is it in fact possible to obtain that bit ? In my deployment for example, the Yesod application is behind nginx, with the configuration:

location / {
    proxy_pass http://127.0.0.1:3000;
}

so would the Yesod app even know that it was reached via http://ift.tt/1bv1Qmc ?




Brackets and Arrays in PHP

Running this on a localhost, everything ran fine. Now, when running it on a web server, I'm getting parse errors regarding the [] in the first line. Is this not a legitimate way to declare an array in PHP?

function render($template, $values = [])
{
    // if template exists, render it
    if (file_exists("../templates/$template"))
    {
        // extract variables into local scope
        extract($values);
        // render template
        require("../templates/$template");
    }




Canon DSLR camera

I am a web designer and thinking of getting into photography, so the photos I take will be mainly for websites, and sometimes for graphic design work.

Can someone give me some suggestions on which model should I get? I prefer Canon. I don't want to spend massive money just yet, but at the same time it would be great if the camera has a bit potential so I can keep it for a while.

Thanks! Please let me know if this is the wrong place for this question, I will remove it.




Organizing web MVVM file content and structure

After considering this for quite some time, I was wondering what you guys thought about it or whether there might already be a known pattern to be used in such cases.

Let's just say for the sake of argument that I'm using C# MVC with Kendo UI (or JQuery).

As I see it, the client code is made up of 3 parts:

  1. markup - HTML.
  2. declarative JavaScript - Kendo UI/JQuery controls.
  3. view model - the MVVM model.

I think these parts should be separated as follows:

I want the view models to interact with each other so I would declare all view models in separate js files and load them upfront.

The declarative javascript is useless without its markup so it should either be put it in the same html file or separated in another js file, to be loaded at the end of the markup (or by using the document ready event).

So at the end of the day I'd have:

product.html

    <ul id="example">
       <li><label>Product Name</label><input type="text"></li>
       <li><label>Product Size</label><input id="product-size" data-bind="value:selectedSize></li>
    </ul>
<script src="product.js"></script>

product.js

kendo.bind($("#example"), viewModel);

$("#color").kendoDropDownList({
                        dataTextField: "text",
                        dataValueField: "value",
                        dataSource: data,
                        index: 0,
                        change: onChange
                    });

product.model.js

var viewModel = kendo.observable({
        selectedSize: null,
};




how to get wordpress.com categories Rss feed?

I'am making an android app should load data from WordPress.com blog

so I need to know the all categories links to do something because the categories are not known how to do that?

thanks.




desktop application also serving content as a server in a web browser

I would like to build a desktop application(basically a media content manager), which also provides the same functionality over the web(as a fancy option when away from the computer).

Simply put i want to expose the app like uTorrent does on its Linux version(as a server).

So please guide me on how I can embed a server along with the application.




How to change a variable in the JavaScript without loading the JavaScript content?

I have a typing web game written using JS. The JS contains all the necessary definition and algorithm of the game. There is a global variable called game_mode. By altering this variable to either 0, 1 or 2, I can load different game modes on the webpage. My difficulty is, I can't figure out a way where I can edit game_mode before I load the JS content using HTML. If I load the JS, the JS already starts running and thus the game starts, using the game_mode hard-coded. Is there anyway to do so?




How to prevent b374k 2.8 web shell uploading

Tell me a way to prevent uploading of web shell scripts ..

i have already used upload authentication ..

but still a user some how uploads the b374k 2.8 shell .

is there a way to prevent it




configuring a subdomain

I am trying to configure the subdonaim, in aws but its not working, where I configure it as follow; below is what I have tried:

subdomain.domain.com

type: CNAME

TTL: 60

value domain.com/page.php

So I was thinking of an alternative solution. Since linking to an ip address to a website, if there was a way i could grab the ip address of that domain.com/page.php, but I am not sure if that's even possible.




Are you fully using css3 and html5 yet?

i support customers on a range of browsers (sadly, mist insist on IE). looking for opinions on when we can safely assume that only eve cases are using non-compliant/old browsers, and when does it become appropriate to tell large customers that they must update browsers?

Some of the features they ask for simply cannot be pulled off in ie 7, 8, or even 9.




Java EE/web diploma

I'm planning to write a diploma in java EE/Web programming. But I have little experience in the given field so I honestly don't know where to start so I thought it would be a good idea to ask experienced developers for professional advice. What are the latest tendencies in these fields, what are the problems today (maybe you need something right now at work) and what directions can be chosen for the research?

Thank You.




need to capture entire request/response?

I have a asp.net MVC 3 application and to get some data I'm hitting a web api.

I need to log all request that we sent to web api and the response that's come from the web api side with whatever the status code including 500.

How to log each request in a text file, what will be the best approach, specially we also need to log 500 status code response also.

Thanks!




Extracting the html source of a webpage(text only) neglecting images and css stuff.

I am working on a project which enables user to access Web pages using SMS without data or WiFi, I have to create a backend which process users SMS and then extract the requested Web page source code for only text,eliminating images and css.I have done with android front end using android studio.The backend development has become hassle now since I am complete newbie to this.I have found numerous article on this topic using node.js but unable to do that, consider this scenario : When a user enters a webpage address in my android client app, it sends user Web address as SMS through telerivet service to my telerivet control panel. I need to have a simple Java script or any other scripts that scraps the webpage which user has requested via the SMS.

NOTE:the page needed to scrap is the page user has requested via SMS

Please help, since this is for my final year project..




samedi 25 avril 2015

Workaround for a premature touchcancel event

I'm trying to modify a jquery code for a website-based dropdown menu for a workaround of a premature touchcancel event being fired on 4.4.2 build samsung galaxy s4.

Here's the code I'm trying to work with:

jQuery(document).ready(function ($) {
'use strict';
    $('.taptap-by-bonfire ul li ul').before($('<span><svg version="1.1" xmlns="http://ift.tt/nvqhV5" xmlns:xlink="http://ift.tt/PGV9lw" viewBox="0 0 512 512" xml:space="preserve"><polygon id="arrow-24-icon" points="206.422,462 134.559,390.477 268.395,256 134.559,121.521 206.422,50 411.441,256 "/></svg></span>'));

    $(".menu > li > span, .sub-menu > li > span").on('touchstart click', function(e) {
    e.preventDefault();
        if (false == $(this).next().is(':visible')) {
            $(this).parent().siblings().find(".sub-menu").slideUp(300);
            $(this).siblings().find(".sub-menu").slideUp(300);
            $(this).parent().siblings().find("span").removeClass("taptap-submenu-active");
        }
        $(this).next().slideToggle(300);
        $(this).toggleClass("taptap-submenu-active");
    })  


    $(".menu > li > span").on('touchstart click', function(e) {
    e.preventDefault();
        if($(".sub-menu > li > span").hasClass('taptap-submenu-active'))
            {
                $(".sub-menu > li > span").removeClass("taptap-submenu-active");
            }
    })

    $(".taptap-menu-button-wrapper").on('touchstart click', function(e) {
        if($(".menu > li > span, .sub-menu > li > span").hasClass('taptap-submenu-active'))
            {
                $(".menu > li").find(".sub-menu").slideUp(300);
                $(".menu > li > span, .sub-menu > li > span").removeClass("taptap-submenu-active");
            }
    })

});

It works well on most devices and on most browsers, however, on that device and default android browser, the menu dropsdown and quickly slides up again, and I'm assuming a premature touchcancel event is being fired. I've tried various things, but I can't seem to have all these elements and not have a touchcancel firing up on that device no matter what I try.

Is there anything I can do to get around this issue with the android browser?




Angular Datatable - Filtering or sorting with "Angular Way" deleting rows

I reduced my code to the smallest version with the error.

The point is, I create a table, the angular way, with an empty array for the Table rows.

After that, I fetch some data, and add it to that same array (with angular.copy)

Even though they are correctly added to the table itself, if I click on a column title to sort it, or try to filter by typing in the input box, the table deletes all the rows.

Could it be a problem with $digest or $apply?

I've created a codepen to reproduce Codepen

HTML

<table datatable="" dt-options="datatable.dtOptions" dt-column-defs="datatable.dtColumnDefs">
    <thead>
      <tr><th></th><th>ID</th><th>Comuna</th><th>Proyecto</th></tr>
    </thead>
    <tbody>
        <tr ng-repeat="doc in json">
          <td>a</td>
          <td>b</td>
          <td>c</td>
          <td>d</td>
        </tr>
      </tbody>
</table>    

Javascript

$scope.json = [];
    $scope.Load = function(){
        _.each(thaJson.d.results, function(doc, i) {
                $scope.json.push(angular.copy(doc))
      })    
  }




Javascript. Replace HTML content of a Div

So I am currently building a website where when you click on a small image it displays bigger above. Along with the image being enlarged text overlays the image describing it and I can't seem to get the code to change the text right. The text is more complicated as it uses spans etc so i have to place HTML code to and it just displays the text without the formatting.

    // Image 1 - Football
function change1() {
    document
        .getElementById("mainPic")
        .src = "http://ift.tt/1OSNKrL"
    ;
    document
        .getElementById("imageCaption")
        .innerHTML = "<span>Lossiemouth Football Club<span class='spacer'></span><br /><span class='spacer'></span>Come watch a game of football!</span>"
    ;
}

// Image 2 - Football
function change2() {
    document
        .getElementById("mainPic")
        .src = "http://ift.tt/1z5OFn6]"
    ;
    document
        .getElementById("imageCaption")
        .innerHTML = "<span>Golf Course<span class='spacer'></span><br /><span class='spacer'></span>Come play a couple rounds of golf!</span>"
    ;
}
<div id="imageCaption">
    <h2 align="left" style="padding-left: 105px;">
        <span>Lossiemouth Football Club
            <span class="spacer"></span>
            <br />
            <span class="spacer"></span>
            Come watch a game of football!
        </span>
    </h2>
</div>

Screen shot examples: Before enter image description here After enter image description here




Web player for MKV files

I got an security cam and it uploads recordings to my ftp in .MKV format.

Now i need an web-player that plays .MKV files and automatically detects new uploads in my record DIR. Because now i need to download the files to watch them.

I'm searching for days now and can't find a solution.

Hope someone can help me out!

Thanks in advanced!




Expanding an existing webapp with Java Servlets

I have an existing and working web app. This web app is a combination of HTML, CSS, Javascript, various Javascript libraries (Jquery etc.), images, and fonts.

Using Tomcat and a Java servlet, I want to be able to deploy this web app. I also need to be able to serve up different web pages based on the URL (that's where the servlets come in, I think).

I found this SO post which shows how to deploy a web app using Tomcat through Tomcat's webapps directory. This works perfectly, except that it only displays the one index.html file, and there is no way to change the displayed HTML based upon the user entered URL.

I also found this other SO post which describes how to return static HTML from a Java servlet. The problem with this, is that it only returns the HTML file, and none of the supporting files (Javascript, CSS, images etc.) which are also necessary for the web app to function properly.

Is it possible for the servlet to return all necessary files along with the HTML file, so that the web app functions properly?




Multiple image sprites vs one

I currently have two image sprites on my website - one "general" sprite and another for navigation bar images. All of the images are used in some way or another on the front page (some get shown when the screen shrinks, using media queries).

Perhaps apart from organisational concerns is there any reason not to combine the two into a single file and eliminate a request along with its overhead?

Thanks.




RDF Triples - Is this what they are?

I decided to stick my teeth into Semantic Web. I'll be honest It's not as easy to grasp as i'd once thought. Am I taking the correct approach? Please note, I am a beginner in regards to RDF triples. Are the predicates serving their purpose or would there be a better appraoch to RDF Triples? In theory I know what i'm doing (i'd like to think) but in practice I'm doubting myself. enter image description here

Thankyou for reading.




PHP post to WebAPI

Well, I know that he headline look simple, but i was looking 3 days for an example on how can you POST to webapi.

Till now i was using JQuery.POST to do my posts, but i need some php scrip to run and talk to my (C#) web API, And it seems impossible to find some examples or explain on how to do that.

Someone gave me then Code :

$response = file_get_contents('http://localhost:59040/api/Email/SendEmails');
$response = json_decode($response);
echo ($response);

But this one does nothing - Not even an error on how to go more into the problem.

I simpley need a php POST to webapi who gets 1 param(String) and return An ok answer or Error,

Thanks alot!

Good day.




How do I put the eclipse war file on "Internet" and also the data that I have stored initially on MySQL server on my laptop

I built this small web app in eclipse (has Jsp pages, java interface, and hibernate for database connectivity).

Now I want to host this as a website. I have the basic idea about web hosting, but what about the database ?? How do I connect the website with that database ??

In short...

1: How do I host a website which is currently in the form of a war file ?

2: How do I put the data which is present in database online (if there is anything called online database) and then keep it connected with my web app ?




Display data in fusion maps [on hold]

I have a bunch of latitude, longitude and accelerometer data. How do we display it in google maps using fusion tables. Eg X = 0.4985925 Y = 1.3030443 Z = 9.654019 Lat = 12.9518421 Lon = 77.5676947 X, Y, Z are accelerometer readings. I need to display some marker at these points.