Hi,
please check this image:
http://postimg.org/image/9w4taldjj/full/
I hope it will be clear
hi,
i add standart google ecommerce code to my page. Everything works fine, just source value always is my plain domain. How to get the normal sources, or set it?
In short, how to get a reference to my purchase of the script, from where people came to shop.
Thanks
Thanks,but i know that. I need faster re-index page.
So is possible ping to google one page?
I wish re-index my blog after i post new content?
I found how send new site map, but i wish send ping after i add post. I don't wish send all new site map.
Maybe google have some api?
Hi,
i need from PDF extract text and images. Maybe you know python library?
Thanks
Hi,
sometimes my one of function work too long.
How i can break my function, if this function work longer than 3 seconds?
thanks
Hi,
i use wordpress and "Google XML Sitemaps" plugin.
The generate good xml sitemap. So with xml site mat structure everything OK.
But something wrong with address (i think).
Google get my page with sub domen, why?
My page is: www.page_address.com, but in google webmaster tools show with sub domen, why?
For more details please look picture:
http://img852.imageshack.us/f/carssitemap.png/
Thanks
Hi, how get from video.google current video pictures? For example i have this video:
http://video.google.com/videoplay?docid=1811233136844420765
And this video pictures url is:
http://video.google.com/ThumbnailServer2?app=vss&contentid=d53e613f82f74c96&offsetms=50000&itag=w160&lang=en&sigh=QGtXRNh3rW4hfa6DSQSFtfOimno
.................
http://images.metacafe.com/thumb/386357/[B]2767198[/B]/4/catalog_top_item5/0/teach_magic_be_magician_money_magic.jpg
And from wher get metacafe second id (2767198) ?
So how only from video id to get a picture link?
Hi,
i have class "User_registration" and in this class i need use many class: "Location", "Links", "Mail", "Module".
i create include all class in file: include 'class/location.php'; include 'class/links.php'; include 'class/mail.php'; include 'class/modules.php';
Now create "User_registration" class.
<?php
class User_registration{
public function insert_to_db($name, $country_code, $home_page)
{
//work with data
return id;
}
public function show_info($id)
{
//work with data
}
}
$reg_u = new User_registration;
$res = $reg_u->insert_to_db($name, $country_code, $home_page);
if($res){
$reg_u->show_info($res);
}
?>
I need in method "insert_to_db" run class: "Location", "Links", "Mail" methods and in "show_info" run some methods of "Location", "Links", "Module" class.
How? How in one class run another class (no't one)
Thanks for help ;)
Hi,
i run soap client:
$dir = "http://address.com/?Version=1.0,wsdl=1";
$client = new SoapClient($dir, array('login' => "test", 'password' => "test"));
Test, print_r($client):
SoapClient Object
(
[_login] => test
[_password] => test
[_soap_version] => 1
[sdl] => Resource id #3
)
And in this server is class:
all_user
* return: array
* access: public
all_user_dt[] get_user(string $id)
* string $id
how get information from this class? I try:
$client->get_user('213');
But i get error:
Fatal error: Uncaught SoapFault exception: [HTTP] Unauthorized in C:\www\index.php:38 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...
Hi, i get all europe countries:
select * from geo.countries where place="Europe"
An how now to find the country's cities where country id: (for example) "23424757".
I would also like to ask how to get tables all column name. Thanks
Hi,
how to run the second function only when the first will be completed in?
$(document).ready(function() {
$("#first").load("first.php?id="+ Math.random());
$("#second").load("second.php?id="+ Math.random());
});
hi,
now i get value if i selected checkbox(id which was selected),
but how get value when i unselected (id which was unselected)?
For example I push on 1, and i get value 1. When I unselect 1, i get value 1.
I hope you understand my problem.
<script>
$(document).ready(function()
{
$("input[type=checkbox]").change(function(event){
$("#result").html("&id=" + this.value);
});
});
</script>
</head>
<body>
<input type="checkbox" name="checkbox_pref" value = "1"/>1
<input type="checkbox" name="checkbox_pref" value = "2"/>2
<input type="checkbox" name="checkbox_pref" value = "3"/>3
<div id="result">result ...</div>
Hi,
for example i have this html code:
<p><strong>Text text.</strong></p>
<p><span style="font-size: 14pt;"><span style="background-color: #ff0000;">Text text...</span></span></p>
Possible write this text with this style on the image (with php GD)?
Thanks
hi,
how find in text only one image?
$text = 'text text <img src = "http://physics.unl.edu/dept/directories/images/gradpics/Cat.jpg" /> text text <img src = "www.url.com/image.gif" />';
preg_match_all('#http:[^<\s>]+[.](gif|png|jpe?g)#i', $text, $all_img);
print_r($all_img);
Hi,
i use latest TCPDF version. If the text is a picture of a bad link shows an error and do not generate a PDF file.
Is it possible to disable this error? If you did not find the image to generate the PDF, but without a picture.
I hope to understand my problem,
Thanks
Hi,
why in cookies put only one value(id)?
When i refresh page all my settings remain, but now there is only one...
Thanks
<script type="text/javascript">
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function change(id){
ID = document.getElementById(id);
if(ID.style.display == "")
ID.style.display = "none";
else
ID.style.display = "";
createCookie("id",id,7); /* 1 week */
}
window.onload = function() {
try{change(readCookie("id"));}catch(e){} //rough example
};
</script>
<div>
<div onclick="change(5)" style="cursor: hand">
<a href = "#">+</a>News
</div>
<div style="display: none" id="5">
News1<br/>
News2<br/>
</div>
<div onclick="change(4)" style="cursor: hand">
<a href = "#">+</a>News2
</div>
<div style="display: none" id="4">
News2 1<br/>
News2 2<br/>
</div>
</div>
Hi,
On this site I found a lot of cool examples of PHP OOP. Maybe you know where to find complete examples? Guest books, registration forms, blog...
When I look at the full model is much easier to understand OOP PHP. As different classes interacting with each other, exchange data How to use the generic class for sending data to the database
Thanks
Hi,
I have time from DB:
string user_time = "17:10:03"; //Hours:minutes:seconds
DateTime time_now = DateTime.Now;
How do I compare the time?, How make this:
if(time_now > user_time)
{
//Do something
}
else
{
//Do something
}
Thanks
I see you are not completely well-understood my problem.
Probably not speak well explain.
I want to create the file(virtual), but he did not save on server.
When creating a virtual, it is presented to the user download. (and not left on the server).
That's why I use these variables:
$data = "first line \n";
$data .= "second line";
This data I get from MySQL data base.
thanks, but where put my data?
"
$data = "first line \n";
$data .= "second line";
"
?
Hi,
why in my new file put all program code?
When i open "new_doc.doc", give:
"
first line
second line<form method = "post">
Download: new_doc.doc,
<input type = "submit" name = "ok" value = "OK" />
</form>
"
<?php
if(isset($_POST['ok']))
{
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=new_doc.doc");
$data = "first line \n";
$data .= "second line";
echo $data;
}
?>
<form method = "post">
Download: new_doc.doc,
<input type = "submit" name = "ok" value = "OK" />
</form>
Maybe there is another way of showing the information for the new window?
I need to display text only, no action from the user does not ..
Hi,
now program show Messagebox and wait user decision.
How make, that program don't wait?
Show Messagebox, ant keep going.
Hi,
why i can coding only 128 bytes text?
Work:
string plainText = "1234567890123456";
Don't work:
string plainText = "12345678901234561";
Don't work:
string plainText = "123456789012345";
string plainText = "1234567890123456";
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
byte[] keyBytes = System.Text.Encoding.UTF8.GetBytes("1234567890123456");
byte[] initVectorBytes = System.Text.Encoding.UTF8.GetBytes("1234567890123456");
RijndaelManaged symmetricKey = new RijndaelManaged();
symmetricKey.Mode = CipherMode.CBC;
symmetricKey.Padding = PaddingMode.Zeros;
ICryptoTransform encryptor = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes);
MemoryStream memoryStream = new MemoryStream();
CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write);
cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length);
cryptoStream.FlushFinalBlock();
byte[] cipherTextBytes = memoryStream.ToArray();
memoryStream.Close();
cryptoStream.Close();
string cipherText = Convert.ToBase64String(cipherTextBytes);
Console.ReadLine();
Sorry, for "left_b".
I forget change.
But why when i delete "float: left", everything looks good.
Hi,
what's wrong with this code?
Now disappear background and div after this code show incorrect.
<html>
<head>
<style type="text/css">
#first{
width: 200px;
background-color: #345752;
}
#left_b{
background:transparent url('img/left.png');
background-position: left top;
background-repeat: repeat-y;
}
#right_b{
background:transparent url('img/right.png');
background-position: right top;
background-repeat: repeat-y;
}
#text{
float: left;
width: 50px;
}
#text2{
float: left;
width: 70px;
}
</style>
</head>
<body>
<div id = "first">
<div id = "left_">
<div id = "right_b">
<div id = "text">
text 1
</div>
<div id = "text2">
text 2
</div>
</div>
</div>
</div>
</body>
</html>
Hi,
which is fastest coding algorithm?
I need to cycle to encode a lot of data. Now, using RC4.
Maybe a faster version.
I do not need high security.
Hi,
my program don't work?
Propgram stop on: this.textBox1.Text = "(New text)";
Thread demoThread;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.demoThread = new Thread(new ThreadStart(this.ThreadProcUnsafe));
this.demoThread.Start();
textBox1.Text = "Written by the main thread.";
}
private void ThreadProcUnsafe()
{
while (true)
{
Thread.Sleep(2000);
this.textBox1.Text = " (New new)";
}
}
Hi,
How best to put the array (100 or more length) in the database (MySQL)?
I do not want multiple access to the database because it is so loaded.
So my solution is as follows:
string insert = "INSERT INTO programs (name, id) VALUES ";
for(int i = 0; i < name.Length; i++)
{
if (i != 0)
{
insert = insert + ",(";
}
else
{
insert = insert + "(";
}
insert = insert + "'" + name[i] + "','" + id[i] + "'";
insert = insert + ")";
}
//INSERT INTO programs (name, id) VALUES ('Peter','32'),('Rikko','343') ....
But maybe is a faster version?
Thanks
Hi,
i have error in line: "student.Add(info);"
Error 1 Use of unassigned local variable 'info'
public struct Students
{
public string Name;
public int ID;
public string Date;
};
static void Main(string[] args)
{
ArrayList student = new ArrayList();
Students info;
info.Name = "Marko";
info.ID = 12;
student.Add(info);
foreach (Students show in student)
{
Console.WriteLine("Name:{0}, ID:{1}", show.Name, Convert.ToString(show.ID));
}
}
Thanks.
Time just does not show a systematic process? Are there any other criteria?
Maybe it is possible to show all processes of time off as Administrator (Logged in as normal user)?
Hi,
Starts the program displays two processes, and emits This one error: "Access is denied".
Compiling errors do not
foreach (Process proc in allProcs)
{
Console.WriteLine("process: {0}, id: {1} Time: {2}", proc.ProcessName, proc.Id, proc.StartTime );
}
Hi,
Dell Studio 1535 cooler always starts, even if the system is not warm up. Plus mouse and keyboard work slowly.
shut down computer, wait (2h.), but still the same. Checks the system load and temperature - all the norm.
What happened?
Compile code:
#!/usr/bin/env python
from distutils.core import setup
import py2exe
setup(
console=["cpu.py"],
zipfile=None
)
Program code:
import wmi
c = wmi.WMI()
for i in c.Win32_Processor ():
cputype = i.Name
print cputype
for i in c.Win32_ComputerSystem():
mem = int(i.TotalPhysicalMemory)
print mem/1000000, "mb"
I have to install Pywin32.
Hi,
i creates this program:
import wmi
c = wmi.WMI()
for i in c.Win32_Processor ():
cputype = i.Name
print cputype
for i in c.Win32_ComputerSystem():
mem = int(i.TotalPhysicalMemory)
print mem/1000000, "mb"
I make exe file with py2exe.
When i run program, i see this error:
D:\py\dist>cpu.exe
Traceback (most recent call last):
File "cpu.py", line 1, in <module>
File "zipextimporter.pyc", line 82, in load_module
File "wmi.pyc", line 88, in <module>
File "zipextimporter.pyc", line 82, in load_module
File "win32com\__init__.pyc", line 5, in <module>
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
What wrong?
Hi,
how change in zope cmf server Document portal type?
"Workflows
This object's portal type is: Document. "
I wish: "This object's portal type is: My new Document."
Thanks
Thanks, but i will this put in template, so i will all made with TAL
<div tal:define="number python: 1">
<tal:block repeat="item s_items">
<div tal:define="number python: number + 1">
<div tal:content="python: number">none</div>
</div>
</tal:block>
</div>
Hi, always show 2. but I would like to show 2 3 4 5 ... How to do? Thanks
Hi,
I use exotic fonts and sometimes the text side-cut corners.
How it fix?
My code:
font = ImageFont.truetype(fontfile, fontsize)
text_width, text_height = font.getsize(text)
img = Image.new('RGBA', (text_width, text_height))
draw = ImageDraw.Draw(img)
draw.text((0, 0), text, font=font, fill=(0, 0, 0))
thanks a lot
By the way, how show process in linux?
Hi,
i download wmi from this:
http://timgolden.me.uk/python/wmi/index.html (windows version)
import wmi
c = wmi.WMI ()
for process in c.Win32_Process ():
print process.ProcessId, process.Name
And run this script in Python 2.6 IDLE
Show this error:
Traceback (most recent call last):
File "C:\Users\lola\Desktop\test.py", line 1, in <module>
import wmi
File "C:\Python26\lib\site-packages\wmi.py", line 88, in <module>
from win32com.client import GetObject, Dispatch
ImportError: No module named win32com.client
What's wrong?
Hi,
Is it possible to use two backgrounds in one div?
One of the background picture would be bottom-up corner, and another drift all div...
On both the overall picture will be posted on the text. Thus, pictures may not be on a different div
hi,
how run standard zope cms?
I download from this: http://www.zope.org/Products/CMF/
CMF-2.1.1.zip (1.42 M)
and
CMFDefault
extract and put in Zope\lib\python\Products, then restart Zope.
But i don't see cms site in add field or control panel
Hi, i create in Plone new Folder( add new item. / Folder).
And how in new Folder put my working Python script?
I hope to understand my problem.
Now i execute as Administrator (properties/Compability/Run this program as an administrator), but is the same ...
My OS: Windows 7 Pro
actually, the manual is written the thema be added in to the C: \ Program Files \ Plone \ src folder, but to me, not the src folder, it created itself.
Hi,
I try insert new themes in PLone 3.
But show this error:
C:\Program Files\Plone>bin\buildout
Uninstalling zopepy.
While:
Installing.
Uninstalling zopepy.
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "c:\program
files\plone\buildout-cache\eggs\zc.buildout-1.4.3-py2.4.egg\z
c\buildout\buildout.py", line 1660, in main
getattr(buildout, command)(args)
File "c:\program
files\plone\buildout-cache\eggs\zc.buildout-1.4.3-py2.4.egg\z
c\buildout\buildout.py", line 471, in install
self._uninstall_part(part, installed_part_options)
File "c:\program
files\plone\buildout-cache\eggs\zc.buildout-1.4.3-py2.4.egg\z
c\buildout\buildout.py", line 594, in _uninstall_part
self._uninstall(
File "c:\program
files\plone\buildout-cache\eggs\zc.buildout-1.4.3-py2.4.egg\z
c\buildout\buildout.py", line 708, in _uninstall
os.remove(f)
OSError: [Errno 13] Permission denied: 'C:\\Program
Files\\Plone\\bin\\zopepy.ex
e'
C:\Program Files\Plone>