首页 \ 问答 \ $ _GET变量的类型(Type of $_GET variable)

$ _GET变量的类型(Type of $_GET variable)

我在.htaccess文件中有这个重写文件

RewriteRule ^(.+)$ index.php?url=$1

然后,当我检查$_GET['url'] ,总是一个字符串。

我有兴趣知道是否有可能在浏览器的地址栏中写下一些魔术符号(或类似的东西)并在$_GET['url']另一种类型(不是字符串)?

或者$_GET的类型总是string


I have this rewriterule in .htaccess file

RewriteRule ^(.+)$ index.php?url=$1

Then, when I check type of $_GET['url'], is always a string.

I interested to know whether or not it's possible, to write in the browser's address bar some magic symbols (or something like this) and obtain in $_GET['url'] an other type (not string)?

Or will the type of $_GET always be string?


原文:https://stackoverflow.com/questions/13388933
更新时间:2023-08-01 11:08

最满意答案

tqdm在一个线程中工作(这很好,因为应用程序不会因为进度条而卡住),因此在打印之前会显示进度条。

当机器看到打印是IO动作时,机器优先考虑tqdm。

你需要在循环之前和之后睡觉。 为此,请在循环之前和之后使用time.sleep(x) (x以秒为单位)来停止问题。 请记住在代码开头import time 。 尝试使用不同的x值,但只有0.1可能会正常工作。


tqdm works in a thread (that's good as the application won't stuck because of the progress bar) and therefore the progress bar is shown before the prints.

As the machine sees that print is an IO action so the machine gives priority to the tqdm.

You need to sleep just before and after the loop. To do so, use time.sleep(x)(x is in seconds) before and after the loop to stop the problem. Remember to import time at the start of your code. Experiment with different values of x, but just 0.1 will probably work fine.

相关问答

更多
  • 尝试将以下方法添加到应用程序的根视图控制器中: - (BOOL)prefersStatusBarHidden { return YES; } Try adding the following method to your app's root view controller: - (BOOL)prefersStatusBarHidden { return YES; }
  • tqdm在一个线程中工作(这很好,因为应用程序不会因为进度条而卡住),因此在打印之前会显示进度条。 当机器看到打印是IO动作时,机器优先考虑tqdm。 你需要在循环之前和之后睡觉。 为此,请在循环之前和之后使用time.sleep(x) (x以秒为单位)来停止问题。 请记住在代码开头import time 。 尝试使用不同的x值,但只有0.1可能会正常工作。 tqdm works in a thread (that's good as the application won't stuck because ...
  • 您可以使用BackgroundWorker来执行此操作 将WorkerReportsProgress属性设置为true,并在DoWork事件处理程序中引发ReportProgress事件 在ProgressChanged的eventhandler中放置你的逻辑来更新你的progresbar 在msdn上有一个例子 You could use a BackgroundWorker to do this Set the WorkerReportsProgress property to true and in ...
  • tqdm需要知道将执行多少iters(总量)以显示进度条。 你可以试试这个: from tqdm import tqdm train_x = range(100) train_y = range(200) train_iter = zip(train_x, train_y) # Notice `train_iter` can only be iter over once, so i get `total` in this way. total = min(len(train_x), len(train ...
  • 这是IE8安全功能。 默认情况下,打开新窗口时,不受信任的站点无法隐藏窗口元素(状态栏,地址栏)。 我们的想法是防止恶意网站伪装成可信站点并隐藏地址和状态栏,以便您无法分辨页面的真实URL。 用户可以选择禁用此功能。 It's an IE8 Security feature. By default, non-trusted sites can't hide window elements (status bar, address bar) when opening new windows. The idea ...
  • 模拟指标仅适用于XCode。 您需要在视图viewcontroller中为视图设置此项。 的UIViewController:preferredStatusBarStyle StackoverFlow问题覆盖相同 The simulated metrics is only for XCode. You need to set this for the view in the views viewcontroller. UIViewController:preferredStatusBarStyle Stac ...
  • 默认情况下,状态栏具有透明背景 ,您只需要在状态栏后面扩展图像的框架。 这是测试快照。 我用红色背景颜色和自定义图像设置了UIImageView。 By default, status bar has transparent background, you just need to extend frame of your image, behind status bar. Here is test snapshot for you. I've set UIImageView with red backgr ...
  • 我非常肯定,出于安全原因,这在任何浏览器中都是不可能的。 否则,钓鱼网站的链接将变得非常难以发现,因为攻击者只能在状态栏中放置一个真正的URL,而危险的链接实际上可能导致其他地方...... 相反,使用onclick事件处理程序代替超链接,并在href属性中放置一个真实有意义的URL来代替javascript:链接(即使该链接仅用于JavaScript)。 I'm pretty sure for security reasons this isn't possible in any browser. Oth ...
  • 您可以为应用创建新主题并更改values / styles.xml中的颜色