Sir,
What's the purpose of Image File Tagging ?
rproffitt commented: Here I thought a regular expression may do. This works too. +15
Sir,
What's the purpose of Image File Tagging ?
Friends,
I am using web service and forms for a number of situations in my project. But now when I try to use same strategy the data is not provided by the provider function. It gives ‘null’ value always. But I can see the value in chrome web console.
page.ts (controller)
call function this.getYearMaster(); in constructor
my controller function is
getYearMaster() {
this.projectplanprovider.getYearMaster()
.then(data => {
this.year = data;
//console.log(this.data);
alert("hi: "+this.year);
});
}
my provider function is
public getYearMaster() {
const obj = {wsname: 'YearMaster' };
const myData = JSON.stringify(obj);
return new Promise((resolve, reject) => {
console.log('will call the web service');
const url = 'http://apps.xxx.gov.in/mobservice/index.php/yyy/';
this.http.post(url, myData, { headers: new HttpHeaders(), responseType: 'json'})
/*.map(res => {
console.log('res1', res);
return res; // is this map needed, when it is returning the same value?
})*/
.subscribe(
res => {
console.log('res2', res);
resolve(res);
},
(err) => {
console.log('oops some error in Project Financial year selection');
reject(err);
}
);
});
}
But I get on 'null' value as response ..
please advise
Thanks
Anes
Dear Friends,
With the Help of my Friend Vishnu A.R I solved the issue
my required Code is
<?php
$selectedTime = "2017-02-10 08:00,2017-02-10 07:00,2017-02-11 09:00";
$arr1 = explode(",", $selectedTime);
$arr2 = array();
foreach($arr1 as $time){
$strtime = strtotime($time);
$arr2[$strtime] = $time;
}
ksort($arr2); // sorting array in ascending order of key value
$arr3 = array();
foreach($arr2 as $key => $time){
$timesplit = explode(" ", $time);
$arr3[$timesplit[0]][] = array('start' => $timesplit[1]);
}
$output = json_encode($arr3);
var_dump($output);
?>
Thanks
Anes
Dear Friends,
I have a string with structure
$selectedTime = "2017-02-10 07:00,2017-02-10 08:00,2017-02-11 09:00";
I need to convert it as
{"2017-02-10":[{"start":"07:00"},{"start":"08:00"}],"2017-02-11":[{"start":"09:00"}]}
any idea ? please advise asap
Thanks
Anes
Friends,
I have a search list as shown in image below
When clicking on a result i need to show that detaIls on same place without going to another page ( like ajax in web) . I click first row in search result got that details as shown
Is that possible ? when click item i call a provider to take web service data. Please advise how it can done with a sample ...
Thanks
Anes
Dear Friends,
I am a newbie in GTK3 development using C. I created a file menu with some sample menu options. But I need to activate each menu using keyboard shortcut. Please provide a sample code based on the given working code .
#include <gtk/gtk.h>
static void open_activated(GtkWidget *f)
{
g_print("File -> Open activated.\n");
}
static void quit_activated(GtkWidget *f)
{
g_print("File -> Quit activated...bye.\n");
gtk_main_quit();
}
static void another_activated(GtkWidget *widget, gpointer data)
{
g_print("%s clicked.\n", (gchar*)data);
}
int main( int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *box;
GtkWidget *menubar;
GtkWidget *filemenu;
GtkWidget *file;
GtkWidget *open;
GtkWidget *quit;
GtkWidget *anothermenu;
GtkWidget *another;
GtkWidget *anothermenuitem;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
//gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size(GTK_WINDOW(window), 400, 250);
gtk_window_set_title(GTK_WINDOW(window), "Linux-buddy.blogspot.com");
menubar = gtk_menu_bar_new();
filemenu = gtk_menu_new();
file = gtk_menu_item_new_with_label("File");
open = gtk_menu_item_new_with_label("Open");
quit = gtk_menu_item_new_with_label("Quit");
gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), filemenu);
gtk_menu_shell_append(GTK_MENU_SHELL(filemenu), open);
gtk_menu_shell_append(GTK_MENU_SHELL(filemenu), quit);
gtk_menu_shell_append(GTK_MENU_SHELL(menubar), file);
//Connects GCallback function open_activated to "activate" signal for "open" menu item
g_signal_connect(G_OBJECT(open), "activate", G_CALLBACK(open_activated), NULL);
//Connects GCallback function quit_activated to "activate" signal for "quit" menu item
g_signal_connect(G_OBJECT(quit), "activate", G_CALLBACK(quit_activated), NULL);
anothermenu = gtk_menu_new();
another = gtk_menu_item_new_with_label("Another");
anothermenuitem = gtk_menu_item_new_with_label("Another Menu Item");
gtk_menu_item_set_submenu(GTK_MENU_ITEM(another), anothermenu);
gtk_menu_shell_append(GTK_MENU_SHELL(anothermenu), anothermenuitem);
gtk_menu_shell_append(GTK_MENU_SHELL(menubar), another);
//Connects GCallback function another_activated to "activate" signal for another
g_signal_connect(G_OBJECT(anothermenuitem), "activate", G_CALLBACK(another_activated), "anothermenuitem");
g_signal_connect(G_OBJECT(another), "activate", G_CALLBACK(another_activated), "another");
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_box_pack_start(GTK_BOX(box), menubar, FALSE, FALSE, 3);
gtk_container_add(GTK_CONTAINER(window), box);
//Connects GCallback function gtk_main_quit to "destroy" signal for "window"
g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
Waiting your fast reply .
Thanks
Anes P.A
Hi dear friends,
My current problem regarding inputstream value processing . I don't get the block level full value as shown in loop.I got last byte value only
cipher.init(cipherMode, publicKey);
byte[] encText = null;
while ( (bufl = inputReader.read(buf)) != -1)
{
encText = RSAEncryptUtil.encrypt(RSAEncryptUtil.copyBytes(buf,bufl),(PublicKey) publicKey);
}
String hexString = HexEncodeDecode.encode(encText);
I need to get encText byte[] value with full encrypted file value . Any body have a fast solution please..
Thanks
Anes
Dear Friends,
I am Anes , doing M.Tech in Cyber Security. As part of our syllabus lab program in "Information Security Lab" we have an experiment "Implementation of proxy based security protocols in C or C++ with features like Confidentiality,Integrity and Authentication" . Actually I am in dark now . My doubt is
1. What are the proxy based security protocols for same purpose (Confidentiality/Integrity/Authentication)?
Please answer me it our exam is 3 days more
Thanks
Anes
Dear been,
I need to know How Virtualization techniques for Security can be implemented . pls reply me ..
Anes
Dear Friends,
I am looking for the topic "Virtualization techniques for Security" and got 3 points
1.Isolation and Protection of hypervisor from external entities
eg; Privileged management VMs
2. Recursive addition of additional virtualization layers
eg: by running commodity hypervisors on top of special "Secure" hypervisors
3. Through hardware trusted platform modules(TPMs)
I have not much idea abt these points . Do you can explain it
Thanks
Anes
Dear pals,
As part of educational syllabus there is a lab program for "Configuring S/MIME for email communication". We are searching a script based installation scheme for Ubuntu linux. But We have no idea how to do it .
Please geeks give an idea how it can implement .
Waiting for your fast reply
Thanks
Anes
Dear Friends,
I am Anes, Saw your post and program in URL : Diffie–Hellman key exchange algorithm, can't find bug in program. I got the answer , but my doubt is
how u can say the value of 'g' should be 5. [line number : 151 (int g_base = 5;//public [base number should set to 2 or 5] ]
The selection of secret for Alice (6) and Bob (15) , what the criteria of it ?
Please reply me with your answer ....
Waiting your reply asap .
Thanks
Anes
Dear L7,,
Thanks for your big help .... dear i also found 1 more link from wikipedia
Waiting your further enhancement ...
Thanks
Anes
hi dear Rubber,,
I don't know abt it . This copy of OS image is got from my collegue .
I think Oracle linux is enough for same . Is it ? Subscribe for free CD kit now , waiting for it
Please advise
Thanks
Anes
Dear rubber,,
I am using Redhat Enterprise Server 6.1 . please advise my problem is still exist
Thanks
Anes
Dear L7....
I expect secure IP multicasting is enough for me . Pls provide the stuff for same
Thanks
Anes
Dear pals,
I am using Virtual Box of Oracle in my Windows 7 pc for running Red Hat Enterprise server 6.1 . But When
I try to install using Yum i got error as below:
Please advise me fast . I am trying it for 2 days
Thanks
Anes
Dear pals,
I have idea regarding "Multicasting" , but not have a topic "Secure multicasting" . Please provide
resource regarding same..
Thanks,
Anes
Hi pals,
I am looking to find a modulus calculation using my casio fx-991 ms calculator
i know how to find modulus using small numbers
eg: 7 mod 3 = 1. This because 7 = 3(2) + 1, in which 1 is the remainder. To do this process on a simple calculator do the following: Take the dividend (7) and divide by the divisor (3), note the answer and discard all the decimals -> example 7/3 = 2.3333333, only worry about the 2. Now multiply this number by the divisor (3) and subtract the resulting number from the original dividend. so 2*3 = 6, and 7 - 6 = 1, thus 1 is 7mod3
but i need to find
it's answer is 50
but when i do i don't get the full number in calculator it show 1.4500000x 10^34
but i don't know how to calculate mod use this type of result .
please advise me
Thanks
Anes
Dear Friends,
I am looking a syllabus topic regarding "CFS(Completely Fair Scheduler) on Linux" .
Please provide a good topic content ....
Anes
Dear pals,
At last I found a good opensource tool for Windows. It's name is
Devshed C++ , but the last version released on 2005 , no problem
it's good for educational purpose.
Thanks,
Anes
DEAR @SCHOL,
IN RSA ALGORITHM IT(e - public key) MUST BE USE PRIME NUMBER WHICH IS NOT THE CONFACTOR OF 'PHI'
Here we input (or randomly insert) two prime numbers p and q
n = pq
phi = (p-1)(q-1)
e = must be a prime number - which we chcek now in this thread - but not cofactor of phi
eg : if we give p = 11 & q = 3
then phi = 10*2 = 20
so we cannot give 5 for e , because it's cofactor of 'phi'(ie 20).
So the value e is a subset of PRIME Numbers .
We need to find the 'd' - Private key from formula
d*e mod phi = 1
Then if M is the Message to encrypt( Here M is integer value in range : 0<M<n)
C- Cipher text , which generate from M
C = M^e mod n[Encryption]
and
M = C^d mod n [Decryption]
This is the criteria(Condition) for RSA algorithm
Dear @vegas,
I am looking your 'Miller-Robin primality test'
Thnks,
Anes
Dear pals,
I create thread on bytes forum , regarding this issue . Please look this thread : Click Here
and help me to implement the RSA algorithm in C. I got the concept of fgets() and sscanf() already . issue in the implementation of primality test for that .please advise
Thanks,
Anes
Dear friends,
I am not looking the logic of prime number , i need to ask the system to enter prime number upto i give that .... I admit it include checking of prime with repeated input entry .... please help with a solution
Thanks,
anes
Dear Friends,
I am looking a small thing , I need a simple code to check the input whether it's prime , if not can enter same
repeateddly upto get a proper value . Please provide a simple code snippet and help me
Thanks,
Anes
Dear pals,
I installed Turbo c for windows 7 ultimate 64 bit , but it's not user friendly .When it use in full screen
the mouse is not working . Any solution for it ? If you know any new C compiler setup let me know.
Thanks,
Anes
Dear utrivedi,chriss,
I check ccavenue and they tell , can handle "5 Credit Cards, 50 Debit Cards, 44+ Indian Net Banks, 4 Cash Cards and 2 Mobile Payments".
Any other good payment systems which do more work than ccavenue ... Advise me
Thanks,
Anes
Dear pals,
I am searching a payment gateway which can do Credit/Debit/Internet banking in a single system.
Do you know any thing in current existing system . Let me know and advise
Thanks
anes
Dear friends,
I am using Wordpress 3.6 . I need to integrate an alert system(to send email notification) to users when a
preference value (Reach price of onion 40 $/kg). Is stored procedure can do any thing with it? Please
advise how it is feasible.
Thanks,
Anes
@diafol,
tried it and make 99% successful . Thanks alot
Dear friends,
I am using wordpress for my activity logging purpose . I have a plugin for chart preparation ,
Wordpress Business intelligenace . . But i need to take that chart data as HTML . I need to
take a php page data as a function return . How it can possible ? file_get_contents() is helpful in this scenario?
Advise me
Thanks,
Anes
@LastMitch
Thanks for your Quick Response . I got solution for it
as
wp_check_password( $password, $data['user_pass'],'')
if return true it's success , else fail
Thanks,
Anes
Dear diafol,
My issue to use jsonp is that most of my data return is in HTML format(78%) . So using jsonp is not approriate to me. Please advise any proxy solution in this case .
Thanks,
Anes
Dear Dani maam,
Do you Please give a cURL version of GET Verb REST call instead of the file_get_contents() method ? Waiting your reply
Thanks,
Anes
Dear pals,
I am newbie in RESTful services . I need to call a GET Verb in Server . I know 2 methods
we can write it as
$.ajax({
url: url,
dataType: "html",
type: 'GET',
data: "id="+id+"&type="+type,
success: function(data){
//$("#content").html(data);
alert(data);
$('table #sample-boxed-2-pagination th a').each(function(){
//this.href = this.href.replace(sub_url, main_url);
var value = this.href.split('?');
//alert(value[0]);
if(value[0]!=sub_url)
{
this.href = this.href.replace(value[0], sub_url);
}
});
}
});
});
But I know it's not working in Cross domain scenario . Please advise a method to work same in all domains .
Using file_get_contents() function like
$response = file_get_contents('https://kkl.com/graph/call?parm1=9');
I know I can call POST verb using cURL as
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/simple_rest_master/test");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$data = array(
'username' => 'foo',
'password' => 'bar'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$contents = curl_exec($ch);
curl_close($ch);
echo $contents; // manipulate response
Do you can advise the syntax of GET call using cURL ?
Waiting your fast reply
Thanks,
Anes
Dear pals,
I am using Wordpress 3.6 for my activity logging purpose . I need to authenticate user from REST , using their username/password . But Wordpress use a framework named "phpass" . I cannot identify how to compare my given password with database table password . Please advise a method to compare it.
Thanks,
Anes
Dear friends,
I am using the XML-RPC Server to implement a simple login authentication as a web service . So I wrote a function in wp-includes\class-wp-xmlrpc-server.php like
function web_auth($host, $db, $dbuser, $dbpass, $username, $password)
{
$dbhandle = mysql_connect($host, $dbuser, $dbpass) or die("Unable to connect to MySQL");
$selected = mysql_select_db($db,$dbhandle) or die("Could not select database");
//$md5_password = md5($password);
$md5_password = wp_hash_password($password);
$result = mysql_query("SELECT count(*) AS total FROM wp_users WHERE user_login='$username' AND user_pass='$md5_password' AND user_status=0");
$data=mysql_fetch_assoc($result);
//echo "SELECT count(*) AS total FROM wp_users WHERE user_login='$username' AND user_pass='$md5_password' AND user_status=0";
//die($data['total']);
if($data['total'] == 1)
{
return true;
}
return false;
}
But the password hash mechanism is not make things proper. Please help me to find the exact password in line
$md5_password = wp_hash_password($password);
Waiting your fast reply
Thanks,
Anes
Dear pritaeas,
I think its a system specific issue, that code work fine in my home pc. problem resolved.
Thnks,
Anes
Dear pals,
I am using the tutorial code of "xmlrpc in wordpress" in URL Click Here , but it shows result as blank in my local wamp but it work fine on another local pc. I attach the code
and preview of the problem. Please check and help me.
<?php
class XMLRPClientWordPress
{
var $XMLRPCURL = "";
var $UserName = "";
var $PassWord = "";
// constructor
public function __construct($xmlrpcurl, $username, $password)
{
$this->XMLRPCURL = $xmlrpcurl;
$this->UserName = $username;
$this->PassWord = $password;
}
function send_request($requestname, $params)
{
$request = xmlrpc_encode_request($requestname, $params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_URL, $this->XMLRPCURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
$results = curl_exec($ch);
curl_close($ch);
return $results;
}
function create_post($title,$body,$category,$keywords='',$encoding='UTF-8')
{
$title = htmlentities($title,ENT_NOQUOTES,$encoding);
$keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding);
$content = array(
'title'=>$title,
'description'=>$body,
'mt_allow_comments'=>0, // 1 to allow comments
'mt_allow_pings'=>0, // 1 to allow trackbacks
'post_type'=>'post',
'mt_keywords'=>$keywords,
'categories'=>array($category)
);
$params = array(0,$this->UserName,$this->PassWord,$content,true);
return $this->send_request('metaWeblog.newPost',$params);
}
function create_page($title,$body,$encoding='UTF-8')
{
$title = htmlentities($title,ENT_NOQUOTES,$encoding);
$content = array(
'title'=>$title,
'description'=>$body
);
$params = array(0,$this->UserName,$this->PassWord,$content,true);
return $this->send_request('wp.newPage',$params);
}
function display_authors()
{
$params = array(0,$this->UserName,$this->PassWord);
return $this->send_request('wp.getAuthors',$params);
}
function sayHello()
{
$params = array();
return $this->send_request('demo.sayHello',$params);
}
}
$objXMLRPClientWordPress = new XMLRPClientWordPress("http://localhost/wp_latest/xmlrpc.php" , "admin" , "admin");
echo '<table border="1" cellpadding="10">';
echo '<tr>';
echo '<td>Request Name</td>';
echo '<td>Result</td>';
echo '</tr>';
echo '<tr>';
echo '<td>demo.sayHello</td>';
echo '<td>'.$objXMLRPClientWordPress->sayHello().'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>metaWeblog.newPost</td>';
echo '<td>'.$objXMLRPClientWordPress->create_post('Hello WordPress XML-RPC', 'This is the content of post done via XML-RPC','').'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>wp.newPage</td>';
echo '<td>'.$objXMLRPClientWordPress->create_page('WordPress XML-RPC page', 'This …
Dear gusano,
Service layer is plugin internal functionality itself .
Currently I checked the case of only 1 plugin connection
with outside world , it's successful and the author of plugin offer more option in pro & ent version of that plugin . Gusano, my next unsurity is in how to implement OAuth2.0 in this setup.
Please advise
Thanks,
Anes
Dear Gusano,
Don't consider Web Service as a main concern , I plan to use the simple
REST API method described in URL Click Here & the plugin WPBI (Wordpress Business Intelligence) allow to communicate with an external plugin call .
So I feel there is no need for a framework for Web service .
please let me know your idea.
Thanks,
Anes
Dear Gusano,
My client need an architecture in which we can take a solution for our own system & for a web service . The Web service is for other web apps.
eg: If we do a plugin in our WP app its service can accessible to other systems through web service .
From my initial analysis I can found that putting a file in WP installation can call the plugin function . But need to tackle the database related connectivity etc....
Advise me
Thanks,
Anes
Dear Friends,
I am using Simple-REST Library for my REST Web service purpose . I need to integrate "OAuth2" with my REST API skeleton.
I attached the REST - API Client & Server for your reference . Please check it and help me with a good solution for implementation.
Thanks,
Anes
Dear dingoellis,
I create a new file as u suggest now , rough checked feel it include ALL files content . I will test that in my office and let you know result. I attach my resultant js of (utils.js, tooltip.js, lineChart.js, legend.js, discreteBar.js,discreteBarChart.js , axis.js)
as common.js here
Thanks,
Anes
Dear dingoellis,almostbob:
I can understand the case of jQuery , I plan to make it as separate in CDN . that's good . So only 7 files need to make single one . i.e utils.js, tooltip.js, lineChart.js, legend.js, discreteBar.js,discreteBarChart.js , axis.js from the attached file list .
May I test it and give feedback .
Thanks alot @dingoellos & @almostbob
Anes
Dear dingoellis,
any way it's not problem of used files . For your reference I attach all the
files with this post . please check and advise me .
Thanks,
Anes
Dear dingoellis,
I check your URL and test . I have 11 js files so I upload all and try . But I got a very small file and it's not included the content of jQuery and some other files . When I test the code using that JS got error of "undefined" stuffs . So I believe it's not good for multiple files .
Please advise .
Thanks,
Anes
Dear friends,
I am using Wordpress 3.6 for my current development . But my client need a system which has independent
layers i.e 3 layers such as
from my analysis I can found that Wordpress has a
**Theme ---- View+DB layer **
and cannot Identify a service layer.
Please advise me with a solution.
Thanks,
Anes